瀏覽代碼

训练营统计增加公司搜索条件

yfh 3 周之前
父節點
當前提交
595fc57a3d
共有 2 個文件被更改,包括 34 次插入1 次删除
  1. 8 0
      .env.development
  2. 26 1
      src/views/course/userCoursePeriod/statistics.vue

+ 8 - 0
.env.development

@@ -42,3 +42,11 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
 VUE_APP_PATIENT_INFO = '客户信息'
 # 添加病人
 VUE_APP_ADD_PATIENT = '添加信息'
+# 患者信息
+VUE_APP_PATIENT_INFO = '客户信息'
+# 添加病人
+VUE_APP_ADD_PATIENT = '添加信息'
+# 患者信息
+VUE_APP_PATIENT_INFO = '客户信息'
+# 添加病人
+VUE_APP_ADD_PATIENT = '添加信息'

+ 26 - 1
src/views/course/userCoursePeriod/statistics.vue

@@ -18,6 +18,22 @@
             />
           </el-select>
         </el-form-item>
+
+        <el-form-item label="公司">
+          <el-select
+            v-model="queryParams.companyId"
+            placeholder="请选择公司"
+            clearable
+            style="width: 400px"
+          >
+            <el-option
+              v-for="item in companyOptions"
+              :key="item.companyId"
+              :label="item.companyName"
+              :value="item.companyId"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="handleQuery">查询</el-button>
         </el-form-item>
@@ -112,7 +128,7 @@
 </template>
 
 <script>
-import {getDays, periodCountSelect} from "@/api/course/userCoursePeriod";
+import {getDays, periodCountSelect, getPeriodCompanyList} from "@/api/course/userCoursePeriod";
 
 export default {
   name: "CourseStatistics",
@@ -134,6 +150,7 @@ export default {
       total: 0,
       // 课程选项
       courseOptions: [],
+      companyOptions: [],
       // 统计数据
       statistics: {
         courseCompleteNum: 0,
@@ -182,8 +199,16 @@ export default {
     initializeData() {
       this.getCourseOptions();
       this.getCountList();
+      this.getCompanyOptions()
       this.initialized = true;
     },
+    getCompanyOptions() {
+      getPeriodCompanyList({
+        periodId: this.periodId
+      }).then(response => {
+        this.companyOptions = response.data || [];
+      });
+    },
     /** 获取课程选项 */
     getCourseOptions() {
       this.loading = true;