From ac47b484e9eaf0f6dbd5f65c7d9a185ea1abfdb6 Mon Sep 17 00:00:00 2001 From: Dayu <1010@qq.com> Date: Thu, 18 Jul 2024 17:27:21 +0800 Subject: [PATCH] =?UTF-8?q?bug=20=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/inspectiontasks.vue | 41 ++++++++++++++---------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/src/views/inspection/inspectiontasks.vue b/src/views/inspection/inspectiontasks.vue index cff2358..ddebc78 100644 --- a/src/views/inspection/inspectiontasks.vue +++ b/src/views/inspection/inspectiontasks.vue @@ -563,26 +563,33 @@ return; } this.stopBox = true; + this.$refs.stopForm.resetForm(); }, submitStop(){ - this.$confirm("是否将选择巡检任务停止?", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" + this.$refs.stopForm.validate((valid, done, msg) => { + if (valid) { + done() + this.$confirm("是否将选择巡检任务停止?", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + return stop(this.ids, this.stopForm.cancelReason); + }) + .then(() => { + this.$refs.stopForm.resetForm(); + this.stopBox = false; + this.onLoad(this.page); + this.$message({ + type: "success", + message: "操作成功!" + }); + this.$refs.crud.toggleSelection(); + }); + } }) - .then(() => { - return stop(this.ids, this.stopForm.cancelReason); - }) - .then(() => { - this.stopForm.cancelReason = ''; - this.stopBox = false; - this.onLoad(this.page); - this.$message({ - type: "success", - message: "操作成功!" - }); - this.$refs.crud.toggleSelection(); - }); + }, handleExport() { this.$confirm("是否导出数据?", "提示", {