From 14699711028f0d157eddfb0432e26ab91f1b4493 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 22 十一月 2022 15:02:25 +0800
Subject: [PATCH] 支持配置设备上线时自动更新查询通道,修复通道刷新进度展示

---
 web_src/src/components/dialog/SyncChannelProgress.vue |   48 ++++++++++++++++++++----------------------------
 1 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/web_src/src/components/dialog/SyncChannelProgress.vue b/web_src/src/components/dialog/SyncChannelProgress.vue
index c972a46..e1c9fe0 100644
--- a/web_src/src/components/dialog/SyncChannelProgress.vue
+++ b/web_src/src/components/dialog/SyncChannelProgress.vue
@@ -63,37 +63,29 @@
           }
 
           if (res.data.data != null) {
-            if (res.data.syncIng) {
+            if (res.data.data.syncIng) {
               if (res.data.data.total == 0) {
-                if (res.data.data.errorMsg !== null ){
-                  this.msg = res.data.data.errorMsg;
-                  this.syncStatus = "exception"
-                }else {
-                  this.msg = `绛夊緟鍚屾涓璥;
-                  this.timmer = setTimeout(this.getProgress, 300)
-                }
-              }else  {
-                if (res.data.data.total == res.data.data.current) {
-                  this.syncStatus = "success"
-                  this.percentage = 100;
-                  this.msg = '鍚屾鎴愬姛';
-                }else {
-                  if (res.data.data.errorMsg !== null ){
-                    this.msg = res.data.data.errorMsg;
-                    this.syncStatus = "exception"
-                  }else {
-                    this.total = res.data.data.total;
-                    this.current = res.data.data.current;
-                    this.percentage = Math.floor(Number(res.data.data.current)/Number(res.data.data.total)* 10000)/100;
-                    this.msg = `鍚屾涓�...[${res.data.data.current}/${res.data.data.total}]`;
-                    this.timmer = setTimeout(this.getProgress, 300)
-                  }
-                }
+                this.msg = `绛夊緟鍚屾涓璥;
+                this.timmer = setTimeout(this.getProgress, 300)
+              }else {
+                this.total = res.data.data.total;
+                this.current = res.data.data.current;
+                this.percentage = Math.floor(Number(res.data.data.current)/Number(res.data.data.total)* 10000)/100;
+                this.msg = `鍚屾涓�...[${res.data.data.current}/${res.data.data.total}]`;
+                this.timmer = setTimeout(this.getProgress, 300)
               }
             }else {
-              this.syncStatus = "success"
-              this.percentage = 100;
-              this.msg = '鍚屾鎴愬姛';
+              if (res.data.data.errorMsg){
+                this.msg = res.data.data.errorMsg;
+                this.syncStatus = "exception"
+              }else {
+                this.syncStatus = "success"
+                this.percentage = 100;
+                this.msg = '鍚屾鎴愬姛';
+                setTimeout(()=>{
+                  this.showDialog = false;
+                }, 3000)
+              }
             }
           }
         }else {

--
Gitblit v1.8.0