提交 5e6b1f26 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

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