|
@@ -18,6 +18,21 @@
|
|
|
/>
|
|
|
</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 +127,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getDays, periodCountSelect} from "@/api/course/userCoursePeriod";
|
|
|
+import {getDays, periodCountSelect, getPeriodCompanyList} from "@/api/course/userCoursePeriod";
|
|
|
|
|
|
export default {
|
|
|
name: "CourseStatistics",
|
|
@@ -134,6 +149,7 @@ export default {
|
|
|
total: 0,
|
|
|
// 课程选项
|
|
|
courseOptions: [],
|
|
|
+ companyOptions: [],
|
|
|
// 统计数据
|
|
|
statistics: {
|
|
|
courseCompleteNum: 0,
|
|
@@ -152,7 +168,8 @@ export default {
|
|
|
pageSize: 10,
|
|
|
videoIdList: [],
|
|
|
// videoId: '',
|
|
|
- periodId: ''
|
|
|
+ periodId: '',
|
|
|
+ companyId: null,
|
|
|
},
|
|
|
// 是否已初始化
|
|
|
initialized: false
|
|
@@ -182,8 +199,17 @@ 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;
|