提交 1740cd8f authored 作者: lihuihui's avatar lihuihui

fix: 修改错题

上级 f4442d0f
<template>
<div>
<div v-for="(questionData, index) in questionData" :key="index">
<!-- 单选多选判断题(题目描述dom结构一样,只那选项区分) -->
<template v-if="questionData.question_item_type == 1 || questionData.question_item_type == 2 || questionData.question_item_type == 6">
<div class="title-type">
......@@ -23,7 +24,7 @@
</ul>
</template>
<!-- 解析 -->
<div class="analysis" v-if="!isAnswer && questionData.question_item_type != 5">
<div class="analysis" v-if="!isAnswer && (questionData.question_item_type != 5 || questionData.question_item_type != 7)">
<div class="title">答案解析</div>
<div class="analy-mian">
<div class="txt1">正确答案:{{ questionData.question_answer }}</div>
......@@ -35,7 +36,7 @@
</div>
</div>
<!-- 复合题 -->
<template v-if="questionData.question_item_type == 5">
<template v-if="questionData.question_item_type == 5 || questionData.question_item_type == 7">
<div class="title-type">
<div class="type">{{ questionData.question_item_title }}</div>
<div class="num">{{ questionData.q_order }}/{{ questionData.total_question_count }}</div>
......@@ -79,6 +80,7 @@
</div>
</template>
</div>
</div>
</template>
<script>
export default {
......@@ -88,13 +90,14 @@ export default {
},
data() {
return {
questionData: {},
questionData: [],
isAnswer: true,
currentCheck: {}
}
},
created() {
this.questionData = this.questionParams.question
console.log(this.questionDatas, 'lhh=1=')
},
mounted() {
this.isChangeAnswer()
......
差异被折叠。
......@@ -161,7 +161,8 @@ export default {
},
// 改变数据
setData(list) {
return list.map(list => {
return list.map(pList => {
return pList.map(list => {
const type = {
1: '单选题',
2: '多选题',
......@@ -196,6 +197,7 @@ export default {
data.question_answer = findAB.sort().toString().replace(new RegExp(',', 'g'), '')
return data
})
})
},
// 获取考卷
getTopic(page, call) {
......@@ -248,11 +250,17 @@ export default {
},
// 点击上一题下一题 答题卡序号
changeData() {
let datas = []
this.questionData.list.map(list => {
if (list.q_order === this.questionParams.questionIndex + 1) {
this.questionParams.question = list
const findData = list.find(item => {
return item.q_order === this.questionParams.questionIndex + 1
})
if (findData) {
datas = list
return false
}
})
this.questionParams.question = datas
},
// 进入指定的题
goAppointQuestion(n) {
......
<template>
<div>
<exam-card :hasSubmitBtn="!!(!$route.query.id)" :hasCountDown="!!(!$route.query.id)" v-if="Object.keys(data).length > 1" @submitExam="submitExam" ref="exam" title="模拟考试" :data="data"></exam-card>
<exam-card :hasSubmitBtn="!!(!$route.query.id)" :hasCountDown="!!(!$route.query.id)" v-if="Object.keys(data).length" @submitExam="submitExam" ref="exam" title="模拟考试" :data="data"></exam-card>
</div>
</template>
<script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论