From 3d3b89a84fd8c3aa524c013afe56c6949fc3a874 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期日, 08 十月 2023 16:19:45 +0800
Subject: [PATCH] feat: 工序添加工艺参数展示

---
 src/components/TaskControlModal.vue |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/components/TaskControlModal.vue b/src/components/TaskControlModal.vue
index a32ed8d..65e2c38 100644
--- a/src/components/TaskControlModal.vue
+++ b/src/components/TaskControlModal.vue
@@ -74,7 +74,7 @@
                   瀹㈡埛鍚嶇О锛歿{ currentTaskData.Order.customer || "" }}
                 </div>
                 <div class="title-item title-item-two">
-                  璐х墿鎻忚堪锛� {{ currentTaskData.Order.orderAttr || "" }}
+                  閫氶亾锛� {{ channelNameConfig[currentTaskData.Channel] || "" }}
                 </div>
 
                 <div class="title-item title-item-two">
@@ -228,13 +228,18 @@
       showBtn: 1,
       num: 0,
       timer: null,
-      safeProduce:'',
+      safeProduce: '',
       message: this.safeProduce,
       messageError: "",
       resParams: {},
       isLoading: false,
       second: 0,
       secondTimer: null,
+      // 閫氶亾鍚嶇О閰嶇疆 Channel 0 瀵瑰簲灞曠ず 0, Channel 1 瀵瑰簲灞曠ず A,鏆傛椂蹇界暐鍏朵綑鎯呭喌
+      channelNameConfig: {
+        0: '0',
+        1: 'A'
+      }
     };
   },
   mounted() {
@@ -271,10 +276,6 @@
     }
   },
   watch: {
-    taskData(val) {
-      this.message = this.safeProduce;
-      this.getInfo();
-    },
     num() {
       if (this.num === 30) {
         clearInterval(this.timer);
@@ -291,6 +292,9 @@
       if (this.timer) {
         clearInterval(this.timer);
       }
+      if (this.secondTimer) {
+        clearInterval(this.secondTimer)
+      }
       this.num = 0;
       this.showBtn = 1;
       this.isLoading = false
@@ -298,7 +302,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 +474,10 @@
           }
         }, err => {
           console.error(err)
-        }).finally(() => {
-          this.isLoading = false
         });
+        setTimeout(() => {
+          this.isLoading = false;
+        }, 30000)
       }
     },
     getCode(res) {

--
Gitblit v1.8.0