mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
课程学习的管理
This commit is contained in:
@@ -55,19 +55,19 @@ const detail = function(id,preview) {
|
||||
const ranking = function(data) {
|
||||
return ajax.post('/xboe/m/course/portal/ranking',data);
|
||||
}
|
||||
/*
|
||||
评分榜
|
||||
/*
|
||||
评分榜
|
||||
@param num 要几条传几条 不传默认五条
|
||||
*/
|
||||
const scorelist=function(num){
|
||||
return ajax.get(`/xboe/m/course/portal/score-list?num=${num}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按课程IDs获取教师
|
||||
* @param {课程IDs} ids
|
||||
* @returns
|
||||
* @param {课程IDs} ids
|
||||
* @returns
|
||||
*/
|
||||
const getTeacherByCourseIDs = function(ids){
|
||||
return ajax.postJson('/xboe/m/course/portal/query-teacher', ids);
|
||||
@@ -81,6 +81,14 @@ const studyCounts=function(num){
|
||||
const courseSearch=function(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 {
|
||||
list,
|
||||
pageList,
|
||||
@@ -89,5 +97,6 @@ export default {
|
||||
scorelist,
|
||||
getTeacherByCourseIDs,
|
||||
studyCounts,
|
||||
courseSearch
|
||||
courseSearch,
|
||||
detailStudy
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
<el-row style="margin-bottom: 20px;">
|
||||
<el-col :span="3">
|
||||
<div class="grid-content bg-purple">
|
||||
课程目录:
|
||||
课程目录:
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
@@ -251,10 +251,11 @@
|
||||
<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> -->
|
||||
<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="课程目录">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.chapterName}}{{scope.row.chapterName? '--': ''}}{{scope.row.contentName}}
|
||||
<!-- {{scope.row.chapterName}}{{scope.row.chapterName? '--': ''}}{{scope.row.contentName}}-->
|
||||
{{scope.row.contentName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
@@ -262,9 +263,10 @@
|
||||
<span>{{scope.row.status == 9? '已完成':'未开始'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="duration" label="时长(分)">
|
||||
<el-table-column prop="duration" label="进度">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -349,6 +351,7 @@ export default {
|
||||
resOwnerListMap:[],
|
||||
sysTypeListMap:[],
|
||||
catalogList: [],
|
||||
courseStudyList: [],
|
||||
sysType: "",
|
||||
// sysTypeList: sysTypeList,
|
||||
treeList: [],
|
||||
@@ -468,7 +471,7 @@ export default {
|
||||
}
|
||||
this.catalogTree = treeList;
|
||||
this.catalogList = treeList;
|
||||
|
||||
|
||||
} else {
|
||||
this.$message.error(rs.message);
|
||||
}
|
||||
@@ -553,6 +556,15 @@ export default {
|
||||
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) {
|
||||
let $this=this;
|
||||
@@ -636,9 +648,10 @@ export default {
|
||||
status: this.signup.status, //状态
|
||||
name: this.signup.name, //姓名
|
||||
pageIndex: this.study.pageIndex,
|
||||
pageSize: this.study.pageSize
|
||||
pageSize: this.study.pageSize,
|
||||
aid:this.study.aid
|
||||
};
|
||||
|
||||
|
||||
apicourseStudy.findSignup(params).then(res => {
|
||||
if (res.status === 200) {
|
||||
let ids = [];
|
||||
@@ -703,7 +716,8 @@ export default {
|
||||
// this.study.detailType = row.courseType;
|
||||
// this.study.examineId = row.courseId;
|
||||
this.study.detailShow = true;
|
||||
this.getRecordDetail(row.courseId);
|
||||
this.getStudyDetail(row.courseId,row.aid);
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user