|
|
|
@ -450,7 +450,7 @@ export default { |
|
|
|
|
this.routes = [ |
|
|
|
|
{ |
|
|
|
|
name: '实验台', |
|
|
|
|
path: `list?keyword=${this.$route.query.keyword || ''}&active=${this.$route.query.active || 0}&typeActive=${this.$route.query.typeActive || 0}&page=${this.$route.query.page || 1}` |
|
|
|
|
path: `list?keyword=${this.$route.query.keyword || ''}&active=${this.$route.query.active || ''}&typeActive=${this.$route.query.typeActive || 0}&page=${this.$route.query.page || 1}` |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: this.curriculumName |
|
|
|
@ -458,7 +458,7 @@ export default { |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
this.courseName = data.curriculumName |
|
|
|
|
this.briefIntroduction = data.briefIntroduction |
|
|
|
|
this.briefIntroduction = data.teachingObjectives |
|
|
|
|
this.teachingObjectives = data.teachingObjectives |
|
|
|
|
this.assessmentList = data.assessmentConfig |
|
|
|
|
this.systemIds = data.systemIds |
|
|
|
@ -581,26 +581,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 = {}) { |
|
|
|
@ -635,20 +637,22 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 保存评论 |
|
|
|
|
submitComment (row, reply) { |
|
|
|
|
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment |
|
|
|
|
if (!content) return Util.errorMsg('请输入内容!') |
|
|
|
|
this.$post(this.api.addComment, { |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
content, |
|
|
|
|
pid: reply ? reply.commentId : 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.addComment, { |
|
|
|
|
mallId: this.mallId, |
|
|
|
|
content, |
|
|
|
|
pid: reply ? reply.commentId : 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 (e, row, reply) { |
|
|
|
|