From bb2799282c9a6d9af7b4762179a7c8bcce9584c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sun, 24 Mar 2024 20:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/projectVideo.vue | 8 ++++---- src/pages/toAIVideoProject.vue | 30 ++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/pages/projectVideo.vue b/src/pages/projectVideo.vue index 63eb1cb..28493e0 100644 --- a/src/pages/projectVideo.vue +++ b/src/pages/projectVideo.vue @@ -1583,7 +1583,7 @@ export default { if (idx == 0) { //that.url0 = url.replace("{{passage}}", it.passageValue); that.url0 = - "http://111.21.209.230:7086/live/cameraid/" + + "https://szgc.jhncidg.com/video/live/cameraid/" + videoDvrNumber + "$" + it.passageValue + @@ -1593,7 +1593,7 @@ export default { if (idx == 1) { //that.url1 = url.replace("{{passage}}", it.passageValue); that.url1 = - "http://111.21.209.230:7086/live/cameraid/" + + "https://szgc.jhncidg.com/video/live/cameraid/" + videoDvrNumber + "$" + it.passageValue + @@ -1603,7 +1603,7 @@ export default { if (idx == 2) { //that.url2 = url.replace("{{passage}}", it.passageValue); that.url2 = - "http://111.21.209.230:7086/live/cameraid/" + + "https://szgc.jhncidg.com/video/live/cameraid/" + videoDvrNumber + "$" + it.passageValue + @@ -1613,7 +1613,7 @@ export default { if (idx == 3) { //that.url3 = url.replace("{{passage}}", it.passageValue); that.url3 = - "http://111.21.209.230:7086/live/cameraid/" + + "https://szgc.jhncidg.com/video/live/cameraid/" + videoDvrNumber + "$" + it.passageValue + diff --git a/src/pages/toAIVideoProject.vue b/src/pages/toAIVideoProject.vue index aafb58d..cee9881 100644 --- a/src/pages/toAIVideoProject.vue +++ b/src/pages/toAIVideoProject.vue @@ -525,6 +525,23 @@ export default { }, init() { clearTimeout(this.initfunc); + clearInterval(this.warningInterval); + //最近预警 定时器 + this.warningInterval = setInterval(this.safeAutomaticRoll, 5000); + this.players.forEach((p) => { + if (p) { + try { + p.stop(); + } catch (e) {} + } + }); + this.wPlayers.forEach((wp) => { + if (wp) { + try { + wp.stop(); + } catch (e) {} + } + }); let initfunc = () => { this.getAlertorTypeList(); this.getAiVideoInfoList("", ""); @@ -533,7 +550,7 @@ export default { this.getAiVideoAlertorTypeCount(); this.initAiVideoAlertorTypeDistribution(); }; - this.initfunc = setTimeout(initfunc, 50); // 定时时间 + this.initfunc = setTimeout(initfunc, 100); // 定时时间 }, //正在发生 safeAutomaticRoll() { @@ -674,7 +691,7 @@ export default { vList.forEach((v, vidx) => { if (v.state) { let url = - "http://111.21.209.230:7086/live/cameraid/" + + "https://szgc.jhncidg.com/video/live/cameraid/" + v.videoDvrNumber + "$" + v.passageValue + @@ -683,7 +700,7 @@ export default { } }); } - }, 800); + }, 600); } else { for (let i = 0; i < 6; i++) { list.push({ state: false }); @@ -757,7 +774,7 @@ export default { zdVList.forEach((zdv, zdidx) => { if (zdv.state) { let url = - "http://111.21.209.230:7086/live/cameraid/" + + "https://szgc.jhncidg.com/video/live/cameraid/" + zdv.videoDvrNumber + "$" + zdv.passageValue + @@ -766,7 +783,7 @@ export default { } }); } - }, 800); + }, 600); } else { this.majorVideoSize = 0; for (let i = 0; i < 6; i++) { @@ -781,9 +798,6 @@ export default { .listView(this.dept?.id || 0, this.projectInfo?.id) .then((response) => { this.warningList = response.data || []; - clearInterval(this.warningInterval); - //最近预警 定时器 - this.warningInterval = setInterval(this.safeAutomaticRoll, 5000); }); }, getAiVideoAlertorTypeCount() {