From 05e5993beba7eaa9b5243ecbee304562070f79be Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 26 Apr 2024 13:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E5=BC=80=E6=8F=90=E4=BA=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/exam.vue | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index b6af69f4..d4b4d7b7 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -422,20 +422,20 @@ export default { let $this=this; let score=this.countTest(); console.log('score='+score); - // if(this.noAnswers.length>0){ - // this.$confirm('还有未答试题,您确定要提交吗?', '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', - // showClose:false, - // type: 'warning' - // }).then(() => { - // this.submitTest(score); - // }).catch(()=>{ + if(this.noAnswers.length>0){ + this.$confirm('还有未答试题,您确定要提交吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + showClose:false, + type: 'warning' + }).then(() => { + this.submitTest(score); + }).catch(()=>{ - // }) - // }else{ - // this.submitTest(score); - // } + }) + }else{ + this.submitTest(score); + } }, countTest(){ //计算考试的分数 //console.log(this.paper.items);