提交 025be5bf authored 作者: lihuihui's avatar lihuihui
......@@ -198,6 +198,7 @@ export default {
showResult() {
this.hasResult = true
this.questionGroups[this.currentPage].hasResult = true
this.$emit('primary', this.currentGroupPage, this.questionGroups)
},
// 上一大题
prev() {
......@@ -309,7 +310,13 @@ export default {
}
}
}
return { ...{ comment_visible: false }, ...scoreItem, ...item, user_answer: userAnswers, sign }
return {
...{ comment_visible: false, result_visible: false },
...scoreItem,
...item,
user_answer: userAnswers,
sign
}
})
result.push(Object.assign({}, question, { question_list: list }))
})
......
......@@ -169,6 +169,11 @@ export default {
}
.question-option-item {
margin-top: 20px;
::v-deep .el-radio,
::v-deep .el-checkbox {
display: flex;
align-items: center;
}
}
.question-option-item__text {
display: inline-block;
......
......@@ -16,6 +16,7 @@
@submit="handleSubmit"
@page-change="handlePageChange"
@delete="deleteQuestion"
@primary="handlePrimary"
ref="exam"
v-loading="loading"
>
......@@ -143,6 +144,12 @@ export default {
})
})
},
// 确认答案
handlePrimary(data, groups) {
this.cacheQuestion(this.genSubmitData(groups)).then(() => {
this.getAllQuestion()
})
},
// 翻页
handlePageChange(index, data, groups) {
const page = parseInt((index - 1) / this.pageSize)
......@@ -153,7 +160,7 @@ export default {
this.cacheQuestion(this.genSubmitData(groups))
},
cacheQuestion(param, callback) {
api.setMyCache(param).then(response => {
return api.setMyCache(param).then(response => {
callback && callback()
})
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论