yujialong 3 months ago
parent 24e44b22ca
commit 499ff58275
  1. 14
      src/layouts/navbar/index.vue
  2. 6
      src/pages/ques/detail/index.vue
  3. 15
      src/pages/testPaper/detail/index.vue

@ -53,7 +53,6 @@ export default {
// title: ''
// },
{
icon: 'user',
index: 'ques',
title: '题库管理',
subs: [
@ -68,7 +67,6 @@ export default {
]
},
{
icon: 'annex',
index: 'testPaper',
title: '试卷管理',
subs: [
@ -91,6 +89,12 @@ export default {
])
},
created () {
const { path } = this.$route
if (path.includes('ques/') || path.includes('knowledge')) {
this.active = '/quesBank'
} else if (path.includes('testPaper/')) {
this.active = '/testPaperLibrary'
}
this.initMenu()
},
methods: {
@ -100,13 +104,7 @@ export default {
//
menuSelect (index) {
this.collapse = false
//
if (index.includes('/')) {
this.$router.push(index)
} else {
this.active = '/user/list'
this.$router.push('/user/list')
}
},
//
initMenu () {

@ -796,18 +796,18 @@ export default {
paperEdit && this.$emit('updateQues', form)
Util.successMsg('保存成功')
!form.questionId && this.keep ? this.init(form) : this.back()
!form.questionId && this.keep ? this.init(form) : this.back(form.questionId)
this.repeatVisible = false
} finally {
this.submiting = false
}
},
back () {
back (cache) {
if (this.paperType) {
//
this.$emit('closeAdd')
} else {
this.questionId ? this.$router.push(this.$store.state.user.referrer2 || 'list') : this.$router.back()
cache ? this.$router.push(this.$store.state.user.referrer2 || 'list') : this.$router.back()
}
},
}

@ -766,6 +766,7 @@ export default {
cur >= 0 && item.examQuestions.splice(cur, 1)
})
item.checkAll = false
this.afterDelQues()
this.calcDifficult()
} else {
Util.warningMsg('请选择数据')
@ -790,6 +791,17 @@ export default {
e.serialNumber = i + 1
})
},
// ()
afterDelQues () {
if (this.repeatQues.length) {
const result = []
this.form.paperOutline.forEach(e => {
result.push(...e.examQuestions)
})
result.map(e => e.repeat = false)
this.hasRepeatQues(result)
}
},
//
async delQues (item, i, noConfirm) {
try {
@ -803,6 +815,7 @@ export default {
}
item.examQuestions.splice(i, 1)
item.checkAll = false
this.afterDelQues()
this.calcDifficult()
} catch (e) { }
},
@ -1029,7 +1042,7 @@ export default {
},
//
back () {
this.$router.push(this.$store.state.user.referrer || 'list')
this.$router.push(this.$store.state.user.referrer2 || 'list')
},
//
drag () {

Loading…
Cancel
Save