提交 e9ae5dac authored 作者: matian's avatar matian

Merge remote-tracking branch 'origin/vite' into vite

......@@ -59,7 +59,7 @@ export default {
clearInterval(this.cacheAnswerTime)
this.cacheAnswerTime = setInterval(() => {
this.submitExam(0)
}, 3000)
}, 15000)
} else {
this.status = 2
this.hasMark = false
......
......@@ -21,7 +21,8 @@ export default {
status: 1, // 考试状态
hasMark: true,
data: {},
cacheAnswerTime: null
cacheAnswerTime: null,
countTime: 0
}
},
beforeMount() {
......@@ -52,7 +53,7 @@ export default {
this.hasMark = false
} else {
clearInterval(this.cacheAnswerTime)
this.cacheAnswerTime = setInterval(this.handleCache, 3000)
this.cacheAnswerTime = setInterval(this.handleCache, 15000)
}
})
},
......@@ -90,6 +91,7 @@ export default {
},
// 缓存答案
handleCache() {
this.countTime += 3
const refData = this.$refs.exam
const params = this.genSubmitData(refData.questionGroups).params
params.status = 0
......@@ -112,7 +114,7 @@ export default {
})
})
const data = {
params: { type: 1, sheet_id: this.data.id, status: 0, answers: JSON.stringify(answers), duration: 0 },
params: { type: 1, sheet_id: this.data.id, status: 0, answers: JSON.stringify(answers), duration: this.countTime },
answerNum: answerNum
}
return data
......
......@@ -11,21 +11,21 @@
<el-col :span="8">
<div class="title">最早交卷</div>
<div>
<span class="num">{{ $route.query.type == 'chapter' ? '-' : dataInfo.submit_info.first }}</span
<span class="num">{{ dataInfo.submit_info.first || '-' }}</span
><span class="fen">分钟</span>
</div>
</el-col>
<el-col :span="8">
<div class="title">最迟交卷</div>
<div>
<span class="num">{{ $route.query.type == 'chapter' ? '-' : dataInfo.submit_info.last }}</span
<span class="num">{{ dataInfo.submit_info.last || '-' }}</span
><span class="fen">分钟</span>
</div>
</el-col>
<el-col :span="8">
<div class="title" style="white-space: nowrap">平均交卷时长</div>
<div>
<span class="num">{{ $route.query.type == 'chapter' ? '-' : dataInfo.submit_info.average }}</span
<span class="num">{{ dataInfo.submit_info.average || '-' }}</span
><span class="fen">分钟</span>
</div>
</el-col>
......
......@@ -4,7 +4,7 @@
<div class="title-type">{{ questionTypeText[data.question_type] }}</div>
<template v-for="pItem in data.list">
<question-list-item
v-for="(item, indexs) in pItem"
v-for="item in pItem"
:data="item"
:question="data"
:key="item.id"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论