From d5e8aa62a11352f228ba449b204d53d4e17897a5 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 05 九月 2022 17:10:21 +0800
Subject: [PATCH] 添加对海康平台录像回放的兼容,修复录像信息发送失败, 级联平台支持开启rtcp保活

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

diff --git a/web_src/src/components/dialog/SyncChannelProgress.vue b/web_src/src/components/dialog/SyncChannelProgress.vue
index 246f1ae..c972a46 100644
--- a/web_src/src/components/dialog/SyncChannelProgress.vue
+++ b/web_src/src/components/dialog/SyncChannelProgress.vue
@@ -57,40 +57,45 @@
         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.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.syncIng) {
+              if (res.data.data.total == 0) {
                 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.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)
+                  }
+                }
               }
+            }else {
+              this.syncStatus = "success"
+              this.percentage = 100;
+              this.msg = '鍚屾鎴愬姛';
             }
           }
-
         }else {
           if (this.syncFlag) {
             this.syncStatus = "success"

--
Gitblit v1.8.0