From 75271baf2b4dba13087674f020afbc7b08a83482 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期三, 31 七月 2024 16:26:20 +0800 Subject: [PATCH] 修改 --- src/views/onlineEducation/classBatch/index.vue | 192 ++++++++++++++++++++++++++++++++--------------- 1 files changed, 129 insertions(+), 63 deletions(-) diff --git a/src/views/onlineEducation/classBatch/index.vue b/src/views/onlineEducation/classBatch/index.vue index c2cc228..d9dbf8b 100644 --- a/src/views/onlineEducation/classBatch/index.vue +++ b/src/views/onlineEducation/classBatch/index.vue @@ -1,12 +1,39 @@ <template> <div class="app-container"> <div style="margin-left: -35px;margin-top: 15px"> - <el-select v-model="queryParams.platform" size="small" style="margin-left: 40px;" placeholder="请选择平台"> + <el-select v-model="queryParams.institutionId" size="small" style="margin-left: 40px;" placeholder="请选择平台"> <el-option v-for="item in platformList" - :key="item.value" - :label="item.label" - :value="item.value"> + :key="item.id" + :label="item.institutionalName" + :value="item.id"> + </el-option> + </el-select> + <el-date-picker + v-model="time" + size="small" + type="daterange" + range-separator="至" + start-placeholder="开始日期" + end-placeholder="结束日期" + value-format="yyyy-MM-DD" + style="margin-left: 40px;" + > + </el-date-picker> + <el-select v-model="queryParams.qualificationType" size="small" style="margin-left: 40px;" clearable placeholder="请选择资格类型"> + <el-option + v-for="item in qualificationList" + :key="item.id" + :label="item.name" + :value="item.id"> + </el-option> + </el-select> + <el-select v-model="queryParams.trainOrgId" size="small" style="margin-left: 40px;" clearable filterable placeholder="请选择所属机构"> + <el-option + v-for="item in trainOrgList" + :key="item.id" + :label="item.name" + :value="item.id"> </el-option> </el-select> <el-button @@ -16,6 +43,7 @@ @click="handleQuery()" >查询</el-button> <el-button + plain size="small" type="primary" style="margin-bottom: 10px" @@ -23,27 +51,42 @@ >重置</el-button> </div> <el-table v-loading="loading" :data="expertList" style="margin-top: 10px"> - <el-table-column label="UUID" align="center" prop="UUID" /> + <el-table-column label="ID" align="center" prop="id" /> <el-table-column label="批次名称" align="center" prop="batchName" /> - <el-table-column label="推送平台" align="center" prop="platform" /> - <el-table-column label="上报时间" align="center" prop="reportTime" /> - <el-table-column label="所属培训机构" align="center" prop="trainingInstitution" /> + <el-table-column label="推送平台" align="center" prop="institutionName" /> + <el-table-column label="开始时间" align="center" prop="startTime" /> + <el-table-column label="计划结束时间" align="center" prop="endTime" /> + <el-table-column label="类别" align="center" prop="category" /> + <el-table-column label="上报时间" align="center" prop="createTime" /> + <el-table-column label="所属培训机构" align="center" prop="trainOrgName" /> <el-table-column label="课程" align="center" > <template #default="scope"> - <div v-for="(item,index) in scope.row.course" :key="index" style="color: #1890ff;cursor: pointer"> - <span @click="handleViewCourse(item)">{{item}}</span> + <div v-for="(item,index) in scope.row.courseVOList" :key="index" style="color: #1890ff;cursor: pointer"> + <span @click="handleViewCourse(item)">{{item.courseName}}</span> </div> </template> </el-table-column> <el-table-column label="学员人数" align="center" prop="student" > <template #default="scope"> - <span style="color: #1890ff;cursor: pointer" @click="openStudent(scope.row)">{{scope.row.student}}</span> + <span style="color: #1890ff;cursor: pointer" @click="openStudent(scope.row)">{{scope.row.studentCount}}</span> </template> </el-table-column> - <el-table-column label="是否有考试" align="center" prop="isExam" /> - <el-table-column label="已开班" align="center" prop="isOfferClass" /> - <el-table-column label="数据更新时间" align="center" prop="updateTime" /> - <el-table-column label="删除标记" align="center" prop="delFlag" /> + <el-table-column label="是否有考试" align="center" prop="haveExam" > + <template #default="scope"> + <span>{{scope.row.haveExam == 0 ? '否' : '是'}}</span> + </template> + </el-table-column> + <el-table-column label="已开班" align="center" prop="openStatus" > + <template #default="scope"> + <span>{{scope.row.openStatus == 0 ? '否' : '是'}}</span> + </template> + </el-table-column> + <el-table-column label="数据更新时间" align="center" prop="updateTime" width="100" /> + <el-table-column label="删除标记" align="center" prop="delFlag" > + <template #default="scope"> + <span>{{scope.row.delFlag == 0 ? '未删除' : '已删除'}}</span> + </template> + </el-table-column> <el-table-column label="学时监管" align="center" class-name="small-padding fixed-width"> <template #default="scope"> <el-button @@ -58,7 +101,7 @@ <pagination v-show="total>0" :total="total" - :page.sync="queryParams.pageIndex" + :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> @@ -73,73 +116,91 @@ import studentList from '@/views/onlineEducation/count/components/studentList.vue' import courseDialog from '@/views/onlineEducation/courseSupervision/components/courseDialog.vue' import classHour from '@/views/onlineEducation/classBatch/components/classHour.vue' +import { listBatch, listQuestion } from '@/api/onlineEducation/student' +import { listPlatSelect } from '@/api/onlineEducation/plat' +import moment from 'moment/moment' export default { name: "nPeopleManage", dicts: [], components: { courseDialog,studentList,classHour}, data() { return { + time: [], loading: false, single: true, multiple: true, showSearch: true, addForm: false, total: 0, - platformList: [ - { - value: '1', - label: '平台1' - }, - { - value: '2', - label: '平台2' - }, - ], + platformList: [], expertList: [], queryParams: { - pageIndex: 1, + pageNum: 1, pageSize: 10, - platform: '' + institutionId: '', + startTime: '', + endTime: '', + qualificationType: null, + trainOrgId: null }, + qualificationList: [ + { + id: 1, + name: '主要负责人' + }, + { + id: 2, + name: '安全生产管理人员' + }, + { + id: 3, + name: '特种作业人员' + } + + ], + trainOrgList: [] }; }, created() { + this.setDate(); this.getList(); + this.getPlat(); }, methods: { + setDate(){ + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + const s = moment(start).format('YYYY-MM-DD') + const e = moment(end).format('YYYY-MM-DD') + this.time = [s,e] + }, getList(){ + // this.queryParams.startTime = moment(this.time[0]).format('YYYY-MM-DD') + // this.queryParams.endTime = moment(this.time[1]).format('YYYY-MM-DD') this.loading = true; - this.expertList = [ - { - UUID: '2024060600001', - batchName: '测试数据1', - platform:'平台1', - reportTime: '2024-6-11 10:32:00', - trainingInstitution: '培训机构1', - course: ['课程1','课程2'], - student:120, - isExam: '是', - isOfferClass: '是', - delFlag:'未删除', - updateTime: '2024-6-11 10:32:00' - }, - { - UUID: '2024060600002', - batchName: '测试数据2', - platform:'平台2', - reportTime: '2024-6-11 10:32:00', - trainingInstitution: '培训机构2', - course: ['课程2'], - student: 132, - isExam: '否', - isOfferClass: '否', - delFlag:'未删除', - updateTime: '2024-6-11 10:32:00' - }, - ] - this.total = 2 - this.loading = false; - + listBatch( this.queryParams).then((res) => { + if (res.code == 200) { + this.expertList = res.rows.map(item => { + return { + ...item, + trainOrgName: item.trainOrgName ? item.trainOrgName : '--', + startTime: item.startTime ? item.startTime : '--', + endTime: item.endTime ? item.endTime : '--', + category: item.category ? item.category : '--' + } + }) + this.total = res.total + this.loading = false; + } + }) + }, + getPlat() { + listPlatSelect().then((res) => { + if (res.code == 200) { + this.platformList = res.data + } + }) }, handleChange(){ @@ -150,17 +211,22 @@ }, resetQuery(){ this.queryParams = { - pageIndex: 1, + pageNum: 1, pageSize: 10, - platform: '' + institutionId: '', + startTime: '', + endTime: '', + qualificationType: null, + trainOrgId: null } + this.time = []; this.getList(); }, handleViewCourse(data){ - this.$refs.courseDialogRef.openDialog(data); + this.$refs.courseDialogRef.openDialog(data,'batch'); }, openStudent(data) { - this.$refs.studentDialog.openDialog(data); + this.$refs.studentDialog.openDialog(data,'batch'); }, openClassHour(data){ this.$refs.classRef.openDialog(data) -- Gitblit v1.9.2