From b0d0d30781a99e53f1a287cdb076da6871085029 Mon Sep 17 00:00:00 2001 From: XiaoQiTong <69035114+XiaoQiTong@users.noreply.github.com> Date: 星期二, 18 十月 2022 20:18:51 +0800 Subject: [PATCH] 修改云端录像选择节点流媒体path不修改的bug device表增加的mediaServerId字段丢失,重新添加 --- web_src/src/components/dialog/SyncChannelProgress.vue | 52 +++++++++++++++++++++++++++++++++++----------------- 1 files changed, 35 insertions(+), 17 deletions(-) diff --git a/web_src/src/components/dialog/SyncChannelProgress.vue b/web_src/src/components/dialog/SyncChannelProgress.vue index 1ec16f4..c972a46 100644 --- a/web_src/src/components/dialog/SyncChannelProgress.vue +++ b/web_src/src/components/dialog/SyncChannelProgress.vue @@ -57,26 +57,44 @@ 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) { - this.syncStatus = "success" - this.percentage = 100; - this.msg = '鍚屾鎴愬姛'; - }else if (res.data.data.total == 0){ - this.msg = `绛夊緟鍚屾涓璥; - this.timmer = setTimeout(this.getProgress, 300) - }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) + + if (res.data.data != null) { + 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.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) { -- Gitblit v1.8.0