|
|
|
@ -440,6 +440,7 @@ export default { |
|
|
|
|
this.addRecord() |
|
|
|
|
}, |
|
|
|
|
async getData () { |
|
|
|
|
if (this.courseId) { |
|
|
|
|
let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`); |
|
|
|
|
this.courseName = data.curriculumName; |
|
|
|
|
// this.coverUrl = data.coverUrl; |
|
|
|
@ -448,6 +449,7 @@ export default { |
|
|
|
|
this.assessmentList = data.assessmentConfig; |
|
|
|
|
this.systemIds = data.systemIds |
|
|
|
|
this.queryProject() |
|
|
|
|
} |
|
|
|
|
this.getStatus() |
|
|
|
|
}, |
|
|
|
|
// 记录最近使用 |
|
|
|
@ -467,6 +469,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 获取章节小节 |
|
|
|
|
async getChapter () { |
|
|
|
|
if (this.courseId) { |
|
|
|
|
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`); |
|
|
|
|
this.chapterList = res.chapterList; |
|
|
|
|
const chapter = this.chapter === undefined ? 0 : +this.chapter |
|
|
|
@ -475,15 +478,18 @@ export default { |
|
|
|
|
if (this.chapterList.length && clist.subsectionList && clist.subsectionList.length && !this.commentId) { |
|
|
|
|
this.preview(clist.subsectionList[section], clist.name, 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取学习进度 |
|
|
|
|
async getProgress () { |
|
|
|
|
if (this.courseId) { |
|
|
|
|
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`); |
|
|
|
|
this.progressList = res.list |
|
|
|
|
if (res.list.length) this.archProject = res.list[0].projectId |
|
|
|
|
this.maximumScores.length || this.getMaximumScore() |
|
|
|
|
this.plan = res.plan |
|
|
|
|
this.schedule = +(res.schedule.replace('%', '')) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取最高分列表 |
|
|
|
|
async getMaximumScore () { |
|
|
|
|