From a5830cddee60be63b540d48532acde7bc570c3ad Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Tue, 28 Feb 2023 15:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E8=80=97=E5=88=86=E6=9E=90=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=BE=AA=E7=8E=AF=EF=BC=8C=E7=A9=BA=E5=BC=8015?= =?UTF-8?q?=E7=A7=92=E6=89=A7=E8=A1=8C5=E6=AC=A1=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=E5=8F=91=E9=80=81=E4=B9=8B=E5=90=8E=E7=A9=BA?= =?UTF-8?q?=E5=BC=80=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/monitoring/light.vue | 10 +- .../sourceAnaly/components/buildElectric.vue | 11 + .../sourceAnaly/components/buildWarm.vue | 12 +- .../sourceAnaly/components/conditionAnaly.vue | 12 +- .../sourceAnaly/components/sourceAnaly.vue | 11 + .../components/sourceSituation.vue | 11 + src/views/sourceAnaly/totalCenter.vue | 256 ++++++------------ src/views/sourceAnaly/totalLeft.vue | 17 +- src/views/sourceAnaly/totalRight.vue | 16 +- 9 files changed, 177 insertions(+), 179 deletions(-) diff --git a/src/components/monitoring/light.vue b/src/components/monitoring/light.vue index d2ba679..81e7f5b 100644 --- a/src/components/monitoring/light.vue +++ b/src/components/monitoring/light.vue @@ -690,6 +690,7 @@ export default { if (row.openStatus == 2) { lightControl(row.code).then((res) => { if (res.data.code == 200) { + this.$message.success("指令发送成功"); if (res.data.data[0].status == 1) { // this.getSblb(); this.checkLight(); @@ -701,6 +702,7 @@ export default { } else { lightControl2(row.code).then((res) => { if (res.data.code == 200) { + this.$message.success("指令发送成功"); if (res.data.data[0].status == 1) { // this.getSblb(); this.checkLight(); @@ -723,6 +725,7 @@ export default { lightControl(codes.toString()).then((res) => { if (res.data.code == 200) { + this.$message.success("指令发送成功"); for (let i = 0; i < res.data.data.length; i++) { if (res.data.data[i].status == 0) { setTimeout(() => { @@ -749,6 +752,7 @@ export default { lightControl2(codes.toString()).then((res) => { if (res.data.code == 200) { + this.$message.success("指令发送成功"); for (let i = 0; i < res.data.data.length; i++) { if (res.data.data[i].status == 0) { setTimeout(() => { @@ -773,6 +777,7 @@ export default { } lightOpenBuild(this.tableData.buildCode).then((res) => { if (res.data.code == 200) { + this.$message.success("指令发送成功"); for (let i = 0; i < res.data.data.length; i++) { if (res.data.data[i].status == 0) { setTimeout(() => { @@ -794,6 +799,7 @@ export default { } lightCloseBuild(this.tableData.buildCode).then((res) => { if (res.data.code == 200) { + this.$message.success("指令发送成功"); for (let i = 0; i < res.data.data.length; i++) { if (res.data.data[i].status == 0) { setTimeout(() => { @@ -808,7 +814,7 @@ export default { }, /** * 定时轮询空开状态 - * 2秒执行一次,执行5次 + * 15秒执行一次,执行5次 */ checkLight() { if (this.intervalCheckLight == 0) { @@ -821,7 +827,7 @@ export default { } this.getSblb(); count--; - }, 2000); + }, 1000 * 15); } }, }, diff --git a/src/views/sourceAnaly/components/buildElectric.vue b/src/views/sourceAnaly/components/buildElectric.vue index c68de70..fc6cc4d 100644 --- a/src/views/sourceAnaly/components/buildElectric.vue +++ b/src/views/sourceAnaly/components/buildElectric.vue @@ -190,10 +190,21 @@ export default { name: "3层", }, ], //楼层 - 只针对耗电分析饼图 + intervalTime33: null, }; }, + beforeDestroy() { + if (this.intervalTime33) { + console.log('clearInterval33') + clearInterval(this.intervalTime33); + this.intervalTime33 = null; + } + }, mounted() { this.getData(); + this.intervalTime33 = setInterval(() => { + this.getData(); + },30*60*1000) }, methods: { //日期类型 diff --git a/src/views/sourceAnaly/components/buildWarm.vue b/src/views/sourceAnaly/components/buildWarm.vue index ce79256..81a5326 100644 --- a/src/views/sourceAnaly/components/buildWarm.vue +++ b/src/views/sourceAnaly/components/buildWarm.vue @@ -148,13 +148,21 @@ export default { "rgb(242,155,119)", ], warmTotal: "", + intervalTime55: null, }; }, + beforeDestroy() { + if (this.intervalTime55) { + console.log('clearInterval55') + clearInterval(this.intervalTime55); + this.intervalTime55 = null; + } + }, mounted() { this.getData(); - setTimeout(() => { + this.intervalTime55 = setInterval(() => { this.getData(); - }, 3600000); + }, 30*60*1000); }, methods: { //日期类型 diff --git a/src/views/sourceAnaly/components/conditionAnaly.vue b/src/views/sourceAnaly/components/conditionAnaly.vue index 2ac4237..f1c8358 100644 --- a/src/views/sourceAnaly/components/conditionAnaly.vue +++ b/src/views/sourceAnaly/components/conditionAnaly.vue @@ -258,13 +258,21 @@ export default { "rgb(242,155,119)", ], workTimeData: [], //空调工作时段 + intervalTime44: null, }; }, + beforeDestroy() { + if (this.intervalTime44) { + console.log('clearInterval44') + clearInterval(this.intervalTime44); + this.intervalTime44 = null; + } + }, mounted() { this.getData(); - setTimeout(() => { + this.intervalTime44 = setInterval(() => { this.getData(); - }, 3600000); + }, 30*60*1000); }, methods: { preDate() { diff --git a/src/views/sourceAnaly/components/sourceAnaly.vue b/src/views/sourceAnaly/components/sourceAnaly.vue index b075d69..d2646c7 100644 --- a/src/views/sourceAnaly/components/sourceAnaly.vue +++ b/src/views/sourceAnaly/components/sourceAnaly.vue @@ -81,10 +81,21 @@ export default { key: "", choseDate: "3", //日期选择模式 chooseDateValue: dateFormat(new Date(), "yyyy-MM-dd"), //日期选中值 + intervalTime11: null, }; }, + beforeDestroy() { + if (this.intervalTime11) { + console.log('clearInterval11') + clearInterval(this.intervalTime11); + this.intervalTime11 = null; + } + }, mounted() { this.getData(); + this.intervalTime11 = setInterval(() => { + this.getData(); + },30*60*1000) // this.getChart(); }, methods: { diff --git a/src/views/sourceAnaly/components/sourceSituation.vue b/src/views/sourceAnaly/components/sourceSituation.vue index 927defd..ef354d4 100644 --- a/src/views/sourceAnaly/components/sourceSituation.vue +++ b/src/views/sourceAnaly/components/sourceSituation.vue @@ -262,10 +262,21 @@ export default { fifth: "", sixth: "", }, + intervalTime22: null, }; }, + beforeDestroy() { + if (this.intervalTime22) { + console.log('clearInterval22') + clearInterval(this.intervalTime22); + this.intervalTime22 = null; + } + }, mounted() { this.getData(); + this.intervalTime22 = setInterval(() => { + this.getData(); + },30*60*1000) }, methods: { getData() { diff --git a/src/views/sourceAnaly/totalCenter.vue b/src/views/sourceAnaly/totalCenter.vue index 6cd9a47..d17991d 100644 --- a/src/views/sourceAnaly/totalCenter.vue +++ b/src/views/sourceAnaly/totalCenter.vue @@ -1,36 +1,24 @@