From 0f6a60f794627e2cb64435043ae2cdf637c5fd12 Mon Sep 17 00:00:00 2001 From: "luoJunYong.123" Date: Thu, 9 Dec 2021 18:31:39 +0800 Subject: [PATCH] update --- src/components/case/index.vue | 64 ++++++++++++++++------------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 2bf4c4d..787dec2 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -5,7 +5,7 @@

实训项目

- + { - this.sureSubmit() - }).catch(() => { - this.$message({ - type: "info", - message: "已取消提交" - }); - }); - }else { + this.$confirm("此操作将视为结束考试, 是否继续?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + center: true + }).then(() => { this.sureSubmit() - } + }).catch(() => { + this.$message({ + type: "info", + message: "已取消提交" + }); + }); }, - sureSubmit(){ + sureSubmit(judge=true){ this.actEndTime = new Date().getTime(); let ruleReqs = sessionStorage.getItem('ruleReqs') let startTime = sessionStorage.getItem('startTime') @@ -607,10 +594,19 @@ export default { } this.sss = 0; this.popContainer = true; - this.$message({ - type: 'success', - message: '提交成功' - }); + if(judge) { + this.$message({ + type: 'success', + message: '提交成功' + }); + }else { + this.$confirm('考试已结束,已自动提交。', '提示', { + confirmButtonText: '确定', + type: 'info', + center: true + }) + } + this.requires = list } this.loading = false