提交 8e5911d7 authored 作者: matian's avatar matian

修改创建考试不显示试卷问题

上级 1b625eb1
...@@ -58,7 +58,8 @@ export default { ...@@ -58,7 +58,8 @@ export default {
queryItem: '', queryItem: '',
q: [], q: [],
transferProps: { label: 'paper_title', key: 'id' }, transferProps: { label: 'paper_title', key: 'id' },
selectedList: [] selectedList: [],
checkedArr: []
} }
}, },
computed: { computed: {
...@@ -100,6 +101,7 @@ export default { ...@@ -100,6 +101,7 @@ export default {
const { total = 0, list = [] } = res.data const { total = 0, list = [] } = res.data
this.total = total this.total = total
this.ExamParerList = list this.ExamParerList = list
console.log(this.ExamParerList, '123')
}) })
}, },
// 上一步 // 上一步
...@@ -112,19 +114,21 @@ export default { ...@@ -112,19 +114,21 @@ export default {
this.$message.warning('请必须选择试卷才能进行下一步操作') this.$message.warning('请必须选择试卷才能进行下一步操作')
return return
} }
this.$parent.$parent.nextStep() console.log(this.q, this.ExamParerList, '0000')
const listArray = [] const listArray = []
for (let i = 0; i < this.q.length; i++) { for (let i = 0; i < this.q.length; i++) {
for (let j = 0; j < this.ExamParerList.length; j++) { for (let j = 0; j < this.ExamParerList.length; j++) {
if (this.q[i] === this.ExamParerList[j].key) { if (this.q[i] === this.ExamParerList[j].id) {
listArray.push(this.ExamParerList[j]) listArray.push(this.ExamParerList[j])
} }
} }
} }
this.checkedArr = listArray
console.log(this.checkedArr)
const qs = this.q.toString() const qs = this.q.toString()
this.$emit('getCheckPaper', qs) this.$emit('getCheckPaper', qs)
this.$emit('getCheckPaperList', listArray) this.$emit('getCheckPaperList', this.checkedArr)
this.$parent.$parent.nextStep()
}, },
// 保存 // 保存
saveExamInfo() { saveExamInfo() {
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
checkedPapers() { checkedPapers() {
const a = this.checkedPaper const a = this.checkedPaper
.map(item => { .map(item => {
return item.label return item.paper_title
}) })
.join(',') .join(',')
.split(',') .split(',')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论