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

Merge branch 'master' into ciis

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