课程学习的管理

This commit is contained in:
86182
2022-10-09 19:44:04 +08:00
parent 72e5fce0ce
commit 770a3a811f
2 changed files with 38 additions and 15 deletions

View File

@@ -81,6 +81,14 @@ const studyCounts=function(num){
const courseSearch=function(query){ const courseSearch=function(query){
return ajax.post('/xboe/m/course/fulltext/search',query); return ajax.post('/xboe/m/course/fulltext/search',query);
} }
/**
* 课程学习进度的详细信息
* @param {String} id
*/
const detailStudy = function(courseId,aid) {
return ajax.get(`/xboe/m/course/portal/detail-study?courseId=${courseId}&aid=${aid}`);
}
export default { export default {
list, list,
pageList, pageList,
@@ -89,5 +97,6 @@ export default {
scorelist, scorelist,
getTeacherByCourseIDs, getTeacherByCourseIDs,
studyCounts, studyCounts,
courseSearch courseSearch,
detailStudy
} }

View File

@@ -251,10 +251,11 @@
<div> <div>
<!-- <div v-if="study.detailType == 10"><auditCourse1 :isDetails="true" :isShow="false" :id="study.examineId"></auditCourse1></div> <!-- <div v-if="study.detailType == 10"><auditCourse1 :isDetails="true" :isShow="false" :id="study.examineId"></auditCourse1></div>
<div v-if="study.detailType == 20"><auditCourse2 :isDetails="true" :isShow="false" :id="study.examineId"></auditCourse2></div> --> <div v-if="study.detailType == 20"><auditCourse2 :isDetails="true" :isShow="false" :id="study.examineId"></auditCourse2></div> -->
<el-table max-height="500" border :data="catalogRecordTree" style="width: 100%"> <el-table max-height="500" border :data="this.courseStudyList" style="width: 100%">
<el-table-column label="课程目录"> <el-table-column label="课程目录">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.chapterName}}{{scope.row.chapterName? '--': ''}}{{scope.row.contentName}} <!-- {{scope.row.chapterName}}{{scope.row.chapterName? '&#45;&#45;': ''}}{{scope.row.contentName}}-->
{{scope.row.contentName}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态"> <el-table-column prop="status" label="状态">
@@ -262,9 +263,10 @@
<span>{{scope.row.status == 9? '已完成':'未开始'}}</span> <span>{{scope.row.status == 9? '已完成':'未开始'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="duration" label="时长(分)"> <el-table-column prop="duration" label="进度">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.duration == 0?'0':scope.row.duration/60}} <!-- {{scope.row.studyDuration == 0?'0':scope.row.studyDuration/60}}-->
{{scope.row.studyDuration}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -349,6 +351,7 @@ export default {
resOwnerListMap:[], resOwnerListMap:[],
sysTypeListMap:[], sysTypeListMap:[],
catalogList: [], catalogList: [],
courseStudyList: [],
sysType: "", sysType: "",
// sysTypeList: sysTypeList, // sysTypeList: sysTypeList,
treeList: [], treeList: [],
@@ -553,6 +556,15 @@ export default {
this.$message.error(rs.message); this.$message.error(rs.message);
} }
}); });
},
getStudyDetail(courseId,aid){
apiCoursePortal.detailStudy(courseId,aid).then(res =>{
if (res.status == 200) {
this.courseStudyList=res.result;
}else {
this.courseStudyList=[];
}
});
}, },
loadStudyData(courseId) { loadStudyData(courseId) {
let $this=this; let $this=this;
@@ -636,7 +648,8 @@ export default {
status: this.signup.status, //状态 status: this.signup.status, //状态
name: this.signup.name, //姓名 name: this.signup.name, //姓名
pageIndex: this.study.pageIndex, pageIndex: this.study.pageIndex,
pageSize: this.study.pageSize pageSize: this.study.pageSize,
aid:this.study.aid
}; };
apicourseStudy.findSignup(params).then(res => { apicourseStudy.findSignup(params).then(res => {
@@ -703,7 +716,8 @@ export default {
// this.study.detailType = row.courseType; // this.study.detailType = row.courseType;
// this.study.examineId = row.courseId; // this.study.examineId = row.courseId;
this.study.detailShow = true; this.study.detailShow = true;
this.getRecordDetail(row.courseId); this.getStudyDetail(row.courseId,row.aid);
} }
} }
}; };