From a8c424e49db9213e879bf6c44cebccdfddaa1808 Mon Sep 17 00:00:00 2001
From: BradyXu <brady_xu@outlook.com>
Date: 星期日, 12 五月 2024 02:00:55 +0800
Subject: [PATCH] 修复sip绑定监听多网卡IP时,新增上级平台新增失败的问题,本地IP改成从配置的多IP下拉选择

---
 web_src/src/components/dialog/SyncChannelProgress.vue |   50 +++++++++++++++++++++-----------------------------
 1 files changed, 21 insertions(+), 29 deletions(-)

diff --git a/web_src/src/components/dialog/SyncChannelProgress.vue b/web_src/src/components/dialog/SyncChannelProgress.vue
old mode 100644
new mode 100755
index 5506d83..e1c9fe0
--- a/web_src/src/components/dialog/SyncChannelProgress.vue
+++ b/web_src/src/components/dialog/SyncChannelProgress.vue
@@ -57,43 +57,35 @@
         method: 'get',
         url:`/api/device/query/${this.deviceId}/sync_status/`,
       }).then((res) => {
-        if (res.data.code == 0) {
+        if (res.data.code === 0) {
           if (!this.syncFlag) {
             this.syncFlag = true;
           }
 
           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