提交 be746725 authored 作者: lihuihui's avatar lihuihui

fix:交卷统计埋点

上级 8be7110c
...@@ -21,7 +21,8 @@ export default { ...@@ -21,7 +21,8 @@ export default {
status: 1, // 考试状态 status: 1, // 考试状态
hasMark: true, hasMark: true,
data: {}, data: {},
cacheAnswerTime: null cacheAnswerTime: null,
countTime: 0
} }
}, },
beforeMount() { beforeMount() {
...@@ -90,6 +91,7 @@ export default { ...@@ -90,6 +91,7 @@ export default {
}, },
// 缓存答案 // 缓存答案
handleCache() { handleCache() {
this.countTime += 3
const refData = this.$refs.exam const refData = this.$refs.exam
const params = this.genSubmitData(refData.questionGroups).params const params = this.genSubmitData(refData.questionGroups).params
params.status = 0 params.status = 0
...@@ -112,7 +114,7 @@ export default { ...@@ -112,7 +114,7 @@ export default {
}) })
}) })
const data = { 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 answerNum: answerNum
} }
return data return data
......
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
<el-col :span="8"> <el-col :span="8">
<div class="title">最早交卷</div> <div class="title">最早交卷</div>
<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> ><span class="fen">分钟</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="title">最迟交卷</div> <div class="title">最迟交卷</div>
<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> ><span class="fen">分钟</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="title" style="white-space: nowrap">平均交卷时长</div> <div class="title" style="white-space: nowrap">平均交卷时长</div>
<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> ><span class="fen">分钟</span>
</div> </div>
</el-col> </el-col>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论