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

Merge branch 'master' into ciis

......@@ -11,6 +11,9 @@
</template>
<div class="exam">
<template v-if="status.examination_status === '00'">
<div style="text-align: center; margin-top: 40px; margin-bottom: -60px">
{{ $t('viewerWork.examTime') }}{{ status.start_time }} ~ {{ status.terminate_time }}
</div>
<div class="no-exam">{{ $t('viewerWork.examEmpty') }}</div>
</template>
<template v-else-if="isSubmited && !isCompleted && !isMultipleExams">
......@@ -46,7 +49,7 @@
<template v-if="isMultipleExams">
<el-button type="primary" @click="handlePrev" v-if="hasPrev">{{ $t('viewerWork.prevPapers') }}</el-button>
<el-button type="primary" @click="handleNext" v-if="hasNext">{{ $t('viewerWork.nextPapers') }}</el-button>
<el-button type="primary" @click="handleNewExam" v-if="hasResubmit">
<el-button type="primary" @click="handleNewExam" v-if="hasResubmit && isExamTime">
{{ $t('viewerWork.anotherSubmitText') }}
</el-button>
</template>
......@@ -191,7 +194,7 @@ export default {
},
// 是否有倒计时
hasCountdown() {
return !!this.status.duration && !this.isSubmited
return !!this.status.duration && this.canEditable
},
// 倒计时文字
countdownDurationText() {
......@@ -234,7 +237,7 @@ export default {
// 获取试题状态
await this.getExamStatus()
this.checkStatusTimer && clearInterval(this.checkStatusTimer)
this.checkStatusTimer = setInterval(this.getExamStatus, 5000)
this.checkStatusTimer = setInterval(this.getExamStatus, 1000)
},
// 获取试题
getExam() {
......@@ -414,8 +417,7 @@ export default {
this.countdownTimer = setInterval(() => {
this.countdownDuration--
if (this.countdownDuration <= 0) {
this.getExam()
this.clearTimer()
this.countdownTimer && clearInterval(this.countdownTimer)
}
}, 1000)
}
......
......@@ -27,7 +27,7 @@ export default {
submitedText: '已提交',
fraction: '分数',
fractionUnit: '分',
examEmpty: '暂无考试',
examEmpty: '考试暂未开始',
examTime: '考试有效时间',
examDeadline: '考试截止时间',
examSubmitedTips: '试卷批改中,请耐心等待',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论