|
|
|
@ -50,7 +50,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="catalog"> |
|
|
|
|
<div v-if="mallId" class="m-b-20"> |
|
|
|
|
<div class="m-b-20"> |
|
|
|
|
<el-button v-if="mallId && !overdue" class="entry" type="primary" size="small" |
|
|
|
|
@click="showBuy">续费</el-button> |
|
|
|
|
<el-button v-if="practiceTheoreticalPaper" class="entry" type="primary" @click="entry(1)">进入理论</el-button> |
|
|
|
@ -462,7 +462,7 @@ export default { |
|
|
|
|
let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`); |
|
|
|
|
this.courseName = data.curriculumName; |
|
|
|
|
// this.coverUrl = data.coverUrl; |
|
|
|
|
this.briefIntroduction = data.briefIntroduction; |
|
|
|
|
this.briefIntroduction = data.teachingObjectives; |
|
|
|
|
this.teachingObjectives = data.teachingObjectives; |
|
|
|
|
this.assessmentList = data.assessmentConfig; |
|
|
|
|
this.systemIds = data.systemIds |
|
|
|
@ -588,26 +588,28 @@ export default { |
|
|
|
|
|
|
|
|
|
// 教学互动列表 |
|
|
|
|
getComment () { |
|
|
|
|
this.$get(this.api.commentTreeList, { |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
}).then(res => { |
|
|
|
|
this.deleteIdentity = res.deleteIdentity |
|
|
|
|
const list = res.rootComments |
|
|
|
|
this.handleComments(list) |
|
|
|
|
this.comments = list |
|
|
|
|
this.$nextTick(async () => { |
|
|
|
|
if (this.curReplyId) { |
|
|
|
|
const el = document.querySelector('#comment' + this.curReplyId) |
|
|
|
|
el && el.scrollIntoView(false) |
|
|
|
|
} |
|
|
|
|
if (this.commentId) { |
|
|
|
|
this.active = 4 |
|
|
|
|
const el = document.getElementById('comment' + this.commentId) |
|
|
|
|
el && el.scrollIntoView(false) |
|
|
|
|
this.commentId = '' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
if (this.mallId) { |
|
|
|
|
this.$get(this.api.commentTreeList, { |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
}).then(res => { |
|
|
|
|
this.deleteIdentity = res.deleteIdentity |
|
|
|
|
const list = res.rootComments |
|
|
|
|
this.handleComments(list) |
|
|
|
|
this.comments = list |
|
|
|
|
this.$nextTick(async () => { |
|
|
|
|
if (this.curReplyId) { |
|
|
|
|
const el = document.querySelector('#comment' + this.curReplyId) |
|
|
|
|
el && el.scrollIntoView(false) |
|
|
|
|
} |
|
|
|
|
if (this.commentId) { |
|
|
|
|
this.active = 4 |
|
|
|
|
const el = document.getElementById('comment' + this.commentId) |
|
|
|
|
el && el.scrollIntoView(false) |
|
|
|
|
this.commentId = '' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 递归处理评论参数 |
|
|
|
|
handleComments (list, parent = {}) { |
|
|
|
@ -642,21 +644,23 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 保存评论 |
|
|
|
|
submitComment (row, reply) { |
|
|
|
|
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment |
|
|
|
|
if (!content) return Util.errorMsg('请输入内容!') |
|
|
|
|
this.$post(this.api.addCommentStation, { |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
content, |
|
|
|
|
// pid: reply ? reply.commentId : row ? row.commentId : 0, |
|
|
|
|
pid: row ? row.commentId : 0, |
|
|
|
|
replyAccountId: reply ? reply.createAccountId : row.createAccountId || '', |
|
|
|
|
status: row ? 2 : 1, |
|
|
|
|
replyCommentId: reply ? reply.commentId : row ? row.commentId : '' |
|
|
|
|
}).then(res => { |
|
|
|
|
this.comment = '' |
|
|
|
|
this.curReplyId = row ? row.commentId : '' |
|
|
|
|
this.getComment() |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
if (this.mallId) { |
|
|
|
|
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment |
|
|
|
|
if (!content) return Util.errorMsg('请输入内容!') |
|
|
|
|
this.$post(this.api.addCommentStation, { |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
content, |
|
|
|
|
// pid: reply ? reply.commentId : row ? row.commentId : 0, |
|
|
|
|
pid: row ? row.commentId : 0, |
|
|
|
|
replyAccountId: reply ? reply.createAccountId : row.createAccountId || '', |
|
|
|
|
status: row ? 2 : 1, |
|
|
|
|
replyCommentId: reply ? reply.commentId : row ? row.commentId : '' |
|
|
|
|
}).then(res => { |
|
|
|
|
this.comment = '' |
|
|
|
|
this.curReplyId = row ? row.commentId : '' |
|
|
|
|
this.getComment() |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 评论点赞 |
|
|
|
|
like (row) { |
|
|
|
@ -825,21 +829,21 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 查询项目 |
|
|
|
|
async queryProject () { |
|
|
|
|
if (this.mallId) { |
|
|
|
|
try { |
|
|
|
|
this.loading = true |
|
|
|
|
const res = await this.$get(this.api.getProjectBySystemId, { |
|
|
|
|
systemId: this.systemIds, |
|
|
|
|
cId: this.courseId, // 课程id |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
permissions: 0 // 0: 练习,1: 考核 |
|
|
|
|
}) |
|
|
|
|
this.projects = res.projects // 实训项目 |
|
|
|
|
this.papers = res.exercisePaperList // 理论试卷 |
|
|
|
|
} finally { |
|
|
|
|
this.loading = false |
|
|
|
|
} |
|
|
|
|
// if (this.mallId) { |
|
|
|
|
try { |
|
|
|
|
this.loading = true |
|
|
|
|
const res = await this.$get(this.api.getProjectBySystemId, { |
|
|
|
|
systemId: this.systemIds, |
|
|
|
|
cId: this.courseId, // 课程id |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
permissions: 0 // 0: 练习,1: 考核 |
|
|
|
|
}) |
|
|
|
|
this.projects = res.projects // 实训项目 |
|
|
|
|
this.papers = res.exercisePaperList // 理论试卷 |
|
|
|
|
} finally { |
|
|
|
|
this.loading = false |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
// 进入实验 |
|
|
|
|
entryProject (projectId = '', paperId = '') { |
|
|
|
|