From e8c72de17374fc43a6460fb94cf3aef657e79812 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期日, 08 十月 2023 13:35:15 +0800
Subject: [PATCH] fix: 修复下发参数后再次点开任务弹窗自动关闭的问题

---
 src/components/TaskControlModal.vue |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/components/TaskControlModal.vue b/src/components/TaskControlModal.vue
index a32ed8d..c45b2b0 100644
--- a/src/components/TaskControlModal.vue
+++ b/src/components/TaskControlModal.vue
@@ -228,7 +228,7 @@
       showBtn: 1,
       num: 0,
       timer: null,
-      safeProduce:'',
+      safeProduce: '',
       message: this.safeProduce,
       messageError: "",
       resParams: {},
@@ -271,10 +271,6 @@
     }
   },
   watch: {
-    taskData(val) {
-      this.message = this.safeProduce;
-      this.getInfo();
-    },
     num() {
       if (this.num === 30) {
         clearInterval(this.timer);
@@ -291,6 +287,9 @@
       if (this.timer) {
         clearInterval(this.timer);
       }
+      if (this.secondTimer) {
+        clearInterval(this.secondTimer)
+      }
       this.num = 0;
       this.showBtn = 1;
       this.isLoading = false
@@ -298,7 +297,7 @@
       this.secondTimer = null
       this.messageError = ''
       this.resParams = {};
-      if (newVal){
+      if (newVal) {
         this.getTaskList().then(() => {
           const firstData = this.taskList[0]
           const id = firstData?.Procedure?.ID
@@ -470,9 +469,10 @@
           }
         }, err => {
           console.error(err)
-        }).finally(() => {
-          this.isLoading = false
         });
+        setTimeout(() => {
+          this.isLoading = false;
+        }, 30000)
       }
     },
     getCode(res) {

--
Gitblit v1.8.0