dev_202412
yujialong 2 months ago
parent 30a507303b
commit 16a1b014c7
  1. 76
      src/pages/station/preview/index.vue
  2. 2
      src/pages/station/product/index.vue
  3. 2
      src/pages/theoryExam/index.vue

@ -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) {

@ -216,7 +216,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: e.mall.productName

@ -179,7 +179,7 @@ export default {
token: Util.local.get(Setting.tokenKey),
paperId: +this.$route.query.paperId, // id
cid: +this.$route.query.cid,
mallId: +this.$route.query.mallId,
mallId: +this.$route.query.mallId || '',
curriculumName: this.$route.query.curriculumName,
assessmentId: this.$route.query.assessmentId, // id
classId: this.$route.query.classId,

Loading…
Cancel
Save