|
|
@@ -224,7 +224,7 @@
|
|
|
<el-card
|
|
|
class="timeline-card"
|
|
|
:class="paper.dataId === showPaperId ? 'active-card' : ''"
|
|
|
- @click.native="changePaper(paper.dataId)"
|
|
|
+ @click.native="changePaper(paper.dataId,paper.status)"
|
|
|
>
|
|
|
<div class="card-item">{{ `开始时间:${paper.startTime}` }}</div>
|
|
|
<div class="card-item">{{ `结束时间:${paper.endTime}` }}</div>
|
|
|
@@ -360,6 +360,13 @@ export default {
|
|
|
this.paperData =
|
|
|
this.paperList.find((i) => i.dataId === this.id) || this.paperList[0]
|
|
|
this.showPaperId = this.paperData.dataId
|
|
|
+
|
|
|
+ const isAllNotFinish = this.paperList.every(item => item.status !== '已完成')
|
|
|
+ if (isAllNotFinish) {
|
|
|
+ this.$message.error('考试未完成或未评分,请稍后再试!')
|
|
|
+ this.closeDialog()
|
|
|
+ return
|
|
|
+ }
|
|
|
},
|
|
|
handleActionEvent ({ key }) {
|
|
|
switch (key) {
|
|
|
@@ -512,7 +519,11 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- changePaper (id) {
|
|
|
+ changePaper (id, status) {
|
|
|
+ if (status !== '已完成') {
|
|
|
+ this.$message.error('考试未完成或未评分,暂时无法查看!')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.showPaperId = id
|
|
|
this.paperData = this.paperList.find((i) => i.dataId === id)
|
|
|
console.log(id)
|