提交 18af015a authored 作者: lihuihui's avatar lihuihui

updata

上级 6b4b249a
......@@ -83,9 +83,9 @@
</div>
</div>
</div>
<div class="st-btn" v-if="title === '随堂小测' || title === '模拟考试' || title === '知识点测试'">
<div :class="ratioNum == 100 ? 'st-btn cent' : 'st-btn'" v-if="title === '随堂小测' || title === '模拟考试' || title === '知识点测试'">
<div class="btn" @click="go(1)">全部解析</div>
<div class="btn" @click="go(-1)">错题解析</div>
<div class="btn" @click="go(-1)" v-if="ratioNum !== 100">错题解析</div>
</div>
</div>
</div>
......@@ -94,6 +94,7 @@
<script>
import Exam from '../action'
// import { Toast } from 'vant'
export default {
name: 'ExamEnd',
data() {
......@@ -403,4 +404,7 @@ export default {
margin-left: auto;
}
}
.cent{
justify-content: center;
}
</style>
......@@ -213,7 +213,7 @@ export default {
clearInterval(this.initTime)
this.initTime = setInterval(() => {
this.examSubmit(0)
}, 5000)
}, 3000)
this.initData()
} else {
this.examEnd()
......@@ -514,18 +514,7 @@ export default {
}
this.examEnd()
this.scrollDom()
// if (res.sheet.remainingTime === undefined) {
// this.setClock(res.sheet.duration)
// } else {
// if (res.sheet.remainingTime > 0) {
// this.setClock(res.sheet.remainingTime)
// } else {
// this.examEnd()
// this.scrollDom()
// }
// }
}
// clearTimeout(this.cache)
setTimeout(() => {
this.examSubmit(0)
}, 1000)
......@@ -548,17 +537,23 @@ export default {
})
},
errorQuestion(data) {
console.log(data.questions)
let count = data.sheet.question_count
data.questions.map((item) => {
item.question_list.map((dItem, index) => {
if (data.score_items[item.id][dItem.id].is_right) {
item.question_list.splice(index, 1)
count--
}
let count = 0
const result = data.questions.map(item => {
const scroeList = data.score_items[item.id]
const list = item.question_list.filter(subitem => {
const score = scroeList[subitem.id]
return !score.is_right
})
item.question_list = list
return item
})
result.map(item => {
item.question_list.map(i => {
count++
})
})
data.sheet.question_count = count
data.questions = result
this.questionsData = data
},
getSecond(time) {
......
......@@ -84,6 +84,14 @@ export default {
})
}
}
},
metaInfo () {
return {
title: '已购课程',
meta: [
// { vmid: 'description', name: 'description', content: this.description }
]
}
}
}
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论