From 1f34754ce77199ffb9bbea09c5ef34e03e30f881 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期五, 05 七月 2024 16:52:18 +0800 Subject: [PATCH] 修改 --- src/views/onlineEducation/classBatch/index.vue | 4 src/views/onlineEducation/courseSupervision/components/courseDialog.vue | 12 + src/views/onlineEducation/examManage/index.vue | 4 src/views/onlineEducation/platformManage/index.vue | 24 ++-- src/views/onlineEducation/count/components/studentList.vue | 39 ++++- src/api/onlineEducation/student.js | 8 + src/views/onlineEducation/courseSupervision/index.vue | 6 src/views/onlineEducation/realtimeStatus/index.vue | 263 +++++++++++++++++++++++++++++++------------ 8 files changed, 253 insertions(+), 107 deletions(-) diff --git a/src/api/onlineEducation/student.js b/src/api/onlineEducation/student.js index b886145..4df0477 100644 --- a/src/api/onlineEducation/student.js +++ b/src/api/onlineEducation/student.js @@ -56,3 +56,11 @@ }) } + +export function studentCourseDetail(uuid) { + return request({ + url: '/th/course/student/' + uuid, + method: 'get' + }) +} + diff --git a/src/views/onlineEducation/classBatch/index.vue b/src/views/onlineEducation/classBatch/index.vue index b2214b8..52ceb6d 100644 --- a/src/views/onlineEducation/classBatch/index.vue +++ b/src/views/onlineEducation/classBatch/index.vue @@ -147,10 +147,10 @@ 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) diff --git a/src/views/onlineEducation/count/components/studentList.vue b/src/views/onlineEducation/count/components/studentList.vue index 1875592..ccf1759 100644 --- a/src/views/onlineEducation/count/components/studentList.vue +++ b/src/views/onlineEducation/count/components/studentList.vue @@ -8,6 +8,7 @@ :before-close="handleClose" > <el-table + height="250" :data="learningTable" style="width: 100%;"> <el-table-column @@ -24,6 +25,9 @@ prop="lessonTocal" label="总学时" > + <template #default="scope"> + {{type == 'batch' ? scope.row.batchLessonNum : scope.row.courseLessonNum}} + </template> </el-table-column> <el-table-column prop="lessonNum" @@ -63,7 +67,7 @@ <script > import lessonReport from '@/views/onlineEducation/studentSupervision/compontents/lessonReport.vue' -import { studentDetail } from '@/api/onlineEducation/student' +import { studentCourseDetail, studentDetail } from '@/api/onlineEducation/student' import { listCourse } from '@/api/onlineEducation/course' export default { name: 'addUser', @@ -76,9 +80,11 @@ dialogStatus: '', dataForm: {}, uuid: '', - total: 2, + total: 0, + type: '', queryParams: { - + pageIndex: 1, + pageSize: 10 }, learningTable: [ { @@ -107,14 +113,27 @@ methods: { getList() { this.loading = true; - studentDetail( this.uuid).then((res) => { - if (res.code == 200) { - this.learningTable = res.data - this.loading = false; - } - }) + if(this.type === 'course'){ + studentCourseDetail( this.uuid).then((res) => { + if (res.code == 200) { + this.learningTable = res.data + this.loading = false; + // this.total = res.data.total + } + }) + }else { + studentDetail( this.uuid).then((res) => { + if (res.code == 200) { + this.learningTable = res.data + this.loading = false; + // this.total = res.data.total + } + }) + } + }, - openDialog (data) { + openDialog (data,type) { + this.type = type; this.uuid = data.uuid; this.getList(); this.dialogVisible = true; diff --git a/src/views/onlineEducation/courseSupervision/components/courseDialog.vue b/src/views/onlineEducation/courseSupervision/components/courseDialog.vue index d533f9f..59d02c7 100644 --- a/src/views/onlineEducation/courseSupervision/components/courseDialog.vue +++ b/src/views/onlineEducation/courseSupervision/components/courseDialog.vue @@ -82,10 +82,16 @@ created() { }, methods: { - openDialog (data) { + openDialog (data,type) { this.dialogVisible = true; - this.courseList = data.outline - this.courseTable = this.recursion(data.outline) + if(type === 'course'){ + this.courseList = data.outline + this.courseTable = this.recursion(data.outline) + }else { + this.courseList = data.chapterList + this.courseTable = this.recursion(data.chapterList) + } + console.log('courseTable',this.courseTable) }, recursion (data) { diff --git a/src/views/onlineEducation/courseSupervision/index.vue b/src/views/onlineEducation/courseSupervision/index.vue index 63d6bc2..feb3c95 100644 --- a/src/views/onlineEducation/courseSupervision/index.vue +++ b/src/views/onlineEducation/courseSupervision/index.vue @@ -25,7 +25,7 @@ </div> <el-table v-loading="loading" :data="expertList" style="margin-top: 10px"> <el-table-column label="课程标识" align="center" prop="courseCode" /> - <el-table-column label="所属机构" align="center" prop="trainOrgName" /> + <el-table-column label="上报平台" align="center" prop="institutionName" /> <el-table-column label="课程名称" align="center" prop="courseName" /> <el-table-column label="课程章节数" align="center" prop="courseNum" > <template #default="scope"> @@ -150,10 +150,10 @@ this.getList(); }, handleViewCourse(data){ - this.$refs.courseDialogRef.openDialog(data); + this.$refs.courseDialogRef.openDialog(data,'course'); }, openStudent(data) { - // this.$refs.studentDialog.openDialog(data); + this.$refs.studentDialog.openDialog(data,'course'); }, check(val){ this.$confirm('此操作将审核该条数据, 是否继续?', '提示', { diff --git a/src/views/onlineEducation/examManage/index.vue b/src/views/onlineEducation/examManage/index.vue index 6df2bac..a61c63b 100644 --- a/src/views/onlineEducation/examManage/index.vue +++ b/src/views/onlineEducation/examManage/index.vue @@ -7,7 +7,7 @@ <el-table-column label="上报平台" align="center" prop="institutionName" /> <el-table-column label="所属培训机构" align="center" prop="trainOrgName" /> <el-table-column label="班级批次" align="center" prop="batchName" /> - <el-table-column label="课程名称" align="center" prop="courseName" /> +<!-- <el-table-column label="课程名称" align="center" prop="courseName" />--> <el-table-column label="考试名称" align="center" prop="examName" /> <el-table-column label="开考时间" align="center" prop="examStartTime" width="100" /> <el-table-column label="结束时间" align="center" prop="examSubmitTime" width="100"/> @@ -19,7 +19,7 @@ <span>{{scope.row.examIsPass == 1 ? '是' : '否'}}</span> </template> </el-table-column> - <el-table-column label="考试次数" align="center" prop="examNum" /> +<!-- <el-table-column label="考试次数" align="center" prop="examNum" />--> </el-table> <pagination v-show="total>0" diff --git a/src/views/onlineEducation/platformManage/index.vue b/src/views/onlineEducation/platformManage/index.vue index 43d5f86..9d1443b 100644 --- a/src/views/onlineEducation/platformManage/index.vue +++ b/src/views/onlineEducation/platformManage/index.vue @@ -21,18 +21,18 @@ </el-table-column> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template #default="scope"> - <el-button - size="mini" - type="text" - v-if="scope.row.status == 1" - @click="handleEnable(scope.row)" - >启用</el-button> - <el-button - size="mini" - type="text" - v-if="scope.row.status == 0" - @click="handleDisable(scope.row)" - >监管禁用</el-button> +<!-- <el-button--> +<!-- size="mini"--> +<!-- type="text"--> +<!-- v-if="scope.row.status == 1"--> +<!-- @click="handleEnable(scope.row)"--> +<!-- >启用</el-button>--> +<!-- <el-button--> +<!-- size="mini"--> +<!-- type="text"--> +<!-- v-if="scope.row.status == 0"--> +<!-- @click="handleDisable(scope.row)"--> +<!-- >监管禁用</el-button>--> <el-button size="mini" type="text" diff --git a/src/views/onlineEducation/realtimeStatus/index.vue b/src/views/onlineEducation/realtimeStatus/index.vue index 8557bf3..eaa3cb1 100644 --- a/src/views/onlineEducation/realtimeStatus/index.vue +++ b/src/views/onlineEducation/realtimeStatus/index.vue @@ -20,6 +20,7 @@ @click="handleQuery()" >查询实时进度</el-button> <el-button + plain size="small" type="primary" style="margin-bottom: 10px" @@ -28,55 +29,58 @@ </div> </div> <!-- 查询数据--> - <div style="margin: 30px 20%" > - <div style="display: flex;align-items: center;margin-bottom: -15px" > - <span style="font-size: 20px;font-weight: 550">姓名:</span> - <span style="font-size: 18px;margin-right: 60px">{{dataList[0].name}}</span> - <span style="font-size: 20px;font-weight: 550">查询平台:</span> - <span style="font-size: 18px">{{dataList[0].institutionalName}}</span> - </div> - <el-divider></el-divider> - <div v-for="(item,index) in dataList" :key="index" v-if="dataList && dataList.length>0"> - <div v-for="(batch,index) in item.batchList" :key="index"> - <div style="display: flex;align-items: center;margin-bottom: -15px" > - <span style="font-size: 20px">班级(批次):</span> - <span style="font-size: 18px;margin-right: 60px">{{batch.batchName}}</span> - <span style="font-size: 20px">创建时间:</span> - <span style="font-size: 18px">{{batch.createTime}}</span> - </div> - <div v-for="(course,index) in batch.courseList" :key="index" style="margin-top: 40px;margin-bottom: 50px"> - <div style="margin-bottom: -15px;display: flex;justify-content: space-between" > - <div style="display: flex;align-items: center;"> - <span style="font-size: 20px">课程名称:</span> - <span style="font-size: 18px;margin-right: 60px">{{course.courseName}}</span> - <span style="font-size: 20px">总学时:</span> - <span style="font-size: 18px;margin-right: 60px">{{course.lessonNum}}</span> - <span style="font-size: 20px">当前学时:</span> - <span style="font-size: 18px;margin-right: 60px">{{course.duration}}</span> - </div> - <el-progress :percentage="course.durationRate" style="width: 250px" ></el-progress> - </div> - <div v-for="(chapter,index) in course.chapterList" :key="index" style="margin-top: 50px;margin-left: 40px;"> - <div style="margin-bottom: -15px;display: flex;justify-content: space-between" > - <div style="display: flex;align-items: center" > - <span style="font-size: 16px;margin-right: 60px">{{chapter.chapterName}}</span> - <span style="font-size: 16px">总时长:</span> - <span style="font-size: 16px;margin-right: 60px">{{chapter.lessonTocal}}</span> - <span style="font-size: 16px"> 已学时长:</span> - <span style="font-size: 16px">{{chapter.lessonNum}}</span> - </div> - <span v-if="chapter.lessonTocal == chapter.lessonNum " style="color: #13ce66">[已完成]</span> - <span v-else style="color: #1890ff">[学习中]</span> - </div> - </div> - </div> + <div style="margin: 30px 20%" > + <div v-if="data"> + <div style="display: flex;align-items: center;margin-bottom: -15px" > + <span style="font-size: 18px;font-weight: 550">姓名:</span> + <span style="font-size: 17px;margin-right: 60px">{{data.name}}</span> + <span style="font-size: 18px;font-weight: 550">查询平台:</span> + <span style="font-size: 17px">{{data.institutionalName}}</span> </div> <el-divider></el-divider> + <div> + <div v-for="(batch,index) in data.batchList" :key="index" > + <div style="display: flex;align-items: center;margin-bottom: -15px" > + <span style="font-size: 18px">班级(批次):</span> + <span style="font-size: 16px;margin-right: 60px">{{batch.batchName}}</span> + <span style="font-size: 18px">创建时间:</span> + <span style="font-size: 16px">{{batch.createTime}}</span> + </div> + <div v-for="(course,index) in batch.courseList" :key="index" style="margin-top: 40px;margin-bottom: 50px"> + <div style="margin-bottom: -15px;display: flex;justify-content: space-between" > + <div style="display: flex;align-items: center;"> + <span style="font-size: 18px">课程名称:</span> + <span style="font-size: 16px;margin-right: 60px">{{course.courseName}}</span> + <span style="font-size: 18px">总学时:</span> + <span style="font-size: 16px;margin-right: 60px">{{course.lessonNum}}</span> + <span style="font-size: 18px">当前学时:</span> + <span style="font-size: 16px;margin-right: 60px">{{course.duration}}</span> + </div> + <el-progress :percentage="course.durationRate" style="width: 250px" ></el-progress> + </div> + <div v-for="(chapter,index) in course.chapterList" :key="index" style="margin-top: 50px;margin-left: 40px;"> + <div style="margin-bottom: -15px;display: flex;justify-content: space-between" > + <div style="display: flex;align-items: center" > + <span style="font-size: 16px;margin-right: 60px">{{chapter.chapterName}}</span> + <span style="font-size: 16px">总时长:</span> + <span style="font-size: 16px;margin-right: 60px">{{chapter.lessonTocal}}</span> + <span style="font-size: 16px"> 已学时长:</span> + <span style="font-size: 16px">{{chapter.lessonNum}}</span> + </div> + <span v-if="chapter.lessonTocal == chapter.lessonNum " style="color: #13ce66">[已完成]</span> + <span v-else style="color: #1890ff">[学习中]</span> + </div> + </div> + </div> + <el-divider></el-divider> + </div> + </div> </div> <el-empty description="暂无数据" style="margin-top: 10%" v-else></el-empty> <pagination v-show="total>0" :total="total" + :layout="layout" :page.sync="queryParams.pageIndex" :limit.sync="queryParams.pageSize" @pagination="getList" @@ -100,13 +104,14 @@ return { total: 2, platformList: [], - dataList: [], + data: {}, queryParams: { pageIndex: 1, - pageSize: 10, + pageSize: 2, institutionId: '', idcard: '' }, + layout: 'total,prev, pager, next, jumper' }; }, created() { @@ -115,7 +120,8 @@ }, methods: { getList(){ - this.dataList = [ + console.log("111",this.queryParams) + this.data = { id: null, idcard: '11111', @@ -163,15 +169,91 @@ ] } ] - } - ] - }, - { - id: null, - idcard: '11111', - name: '李四', - institutionalName: '链工宝', - batchList: [ + }, + { + batchName: 'xxxx', + createTime: 'xxxx', + courseList: [ + { + courseName: 'xx', + lessonNum: 100, + duration: 90, + durationRate: 90, + chapterList: [ + { + chapterName: '第5章:章节名称', + lessonTocal: 20, + lessonNum: 10 + }, + { + chapterName: '第1章:章节名称', + lessonTocal: 80, + lessonNum: 80 + }, + ] + }, + { + courseName: 'xx', + lessonNum: 100, + duration: 90, + durationRate: 90, + chapterList: [ + { + chapterName: '第5章:章节名称', + lessonTocal: 20, + lessonNum: 10 + }, + { + chapterName: '第1章:章节名称', + lessonTocal: 80, + lessonNum: 80 + }, + ] + } + ] + }, + { + batchName: 'xxxx', + createTime: 'xxxx', + courseList: [ + { + courseName: 'xx', + lessonNum: 100, + duration: 90, + durationRate: 90, + chapterList: [ + { + chapterName: '第5章:章节名称', + lessonTocal: 20, + lessonNum: 10 + }, + { + chapterName: '第1章:章节名称', + lessonTocal: 80, + lessonNum: 80 + }, + ] + }, + { + courseName: 'xx', + lessonNum: 100, + duration: 90, + durationRate: 90, + chapterList: [ + { + chapterName: '第5章:章节名称', + lessonTocal: 20, + lessonNum: 10 + }, + { + chapterName: '第1章:章节名称', + lessonTocal: 80, + lessonNum: 80 + }, + ] + } + ] + }, { batchName: 'xxxx', createTime: 'xxxx', @@ -214,9 +296,60 @@ } ] } + ] } - ] + // { + // id: null, + // idcard: '11111', + // name: '李四', + // institutionalName: '链工宝', + // batchList: [ + // { + // batchName: 'xxxx', + // createTime: 'xxxx', + // courseList: [ + // { + // courseName: 'xx', + // lessonNum: 100, + // duration: 90, + // durationRate: 90, + // chapterList: [ + // { + // chapterName: '第5章:章节名称', + // lessonTocal: 20, + // lessonNum: 10 + // }, + // { + // chapterName: '第1章:章节名称', + // lessonTocal: 80, + // lessonNum: 80 + // }, + // ] + // }, + // { + // courseName: 'xx', + // lessonNum: 100, + // duration: 90, + // durationRate: 90, + // chapterList: [ + // { + // chapterName: '第5章:章节名称', + // lessonTocal: 20, + // lessonNum: 10 + // }, + // { + // chapterName: '第1章:章节名称', + // lessonTocal: 80, + // lessonNum: 80 + // }, + // ] + // } + // ] + // } + // ] + // } + this.total = 4; // listCourse( this.queryParams).then((res) => { // if (res.code == 200) { // this.expertList = res.rows.map(item => { @@ -228,9 +361,6 @@ // } // }) }, - openUrl(url) { - window.open(url,'_blank') - }, getPlat() { listPlatSelect().then((res) => { if (res.code == 200) { @@ -239,9 +369,7 @@ }) }, - handleChange(){ - }, handleQuery(){ this.getList(); @@ -255,22 +383,7 @@ } this.getList(); }, - handleViewCourse(data){ - this.$refs.courseDialogRef.openDialog(data); - }, - openStudent(data) { - // this.$refs.studentDialog.openDialog(data); - }, - check(val){ - this.$confirm('此操作将审核该条数据, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(async () => { - }).catch(() => { - }); - } } }; </script> -- Gitblit v1.9.2