From 8b2c4adac0502b554773e5ed6d7d23b264c5c51a Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Wed, 17 May 2023 10:56:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=BD=AE=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pictureRotation/index.vue | 28 +++++++++++--- .../components/setschedule.vue | 38 ++++++++++++++----- src/views/realTimeMonitor/index.vue | 1 + 3 files changed, 52 insertions(+), 15 deletions(-) diff --git a/src/views/pictureRotation/index.vue b/src/views/pictureRotation/index.vue index 31f6f9a..17ef42e 100644 --- a/src/views/pictureRotation/index.vue +++ b/src/views/pictureRotation/index.vue @@ -35,18 +35,36 @@
- - +
+ +
+
+ +
+

{{ item.linename }}-{{ item.displayname }}-{{ item.channnelname }} diff --git a/src/views/realTimeMonitor/components/setschedule.vue b/src/views/realTimeMonitor/components/setschedule.vue index 436dc56..176a2f8 100644 --- a/src/views/realTimeMonitor/components/setschedule.vue +++ b/src/views/realTimeMonitor/components/setschedule.vue @@ -4,6 +4,7 @@ title="时间表设置" :visible.sync="isShow" :close-on-click-modal="false" + @close="handleclose" width="60%" > @@ -25,7 +26,11 @@

时间表:
-
+
{ + this.searchRealtime(); + }, 10000); }) .catch((err) => { this.$message.error("查询失败"); @@ -283,11 +294,13 @@ export default { requestId: this.newrequestId, }).then((res) => { console.log(res); - if (res.data.isNew) { - console.log(res.data.list); - } else { - //timer = setInterval(this.searchRealtime, 3000); - // this.searchRealtime(); + if (res.data.isNew == true) { + this.shedulenr = res.data.list; + this.$message({ + message: "装置信息已更新", + type: "success", + }); + clearInterval(this.timer); } }); }, @@ -422,6 +435,7 @@ export default { }, closebtn() { this.isShowset = false; + clearInterval(this.timer); this.deviceList(); }, display() { @@ -430,6 +444,10 @@ export default { hide() { this.isShow = false; }, + handleclose() { + clearInterval(this.timer); + console.log("关闭轮询"); + }, }, }; diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index 28f8f0e..ec53038 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -319,6 +319,7 @@ export default { this.channelOption = []; this.channelListOption = []; this.getChannelList(this.channelId); //获取通道id接口 + this.stop(); }, //获取通道的接口 getChannelList(id) {