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 @@