能耗分析定时循环,空开15秒执行5次查询指令发送之后空开状态

dev
xuechunyuan 3 years ago
parent 7c2b24b6b5
commit a5830cddee
  1. 10
      src/components/monitoring/light.vue
  2. 11
      src/views/sourceAnaly/components/buildElectric.vue
  3. 12
      src/views/sourceAnaly/components/buildWarm.vue
  4. 12
      src/views/sourceAnaly/components/conditionAnaly.vue
  5. 11
      src/views/sourceAnaly/components/sourceAnaly.vue
  6. 11
      src/views/sourceAnaly/components/sourceSituation.vue
  7. 256
      src/views/sourceAnaly/totalCenter.vue
  8. 17
      src/views/sourceAnaly/totalLeft.vue
  9. 16
      src/views/sourceAnaly/totalRight.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);
}
},
},

@ -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: {
//

@ -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: {
//

@ -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() {

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

@ -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() {

@ -1,36 +1,24 @@
<template>
<div class="total-center">
<!-- 园区能耗总体情况 -->
<div
class="analy-total"
:style="{
height: area == 1 ? '26.937rem' : '24.937rem',
backgroundImage:
'url(' +
require(area == 1
? '../../../public/img/analysis/total-analy.png'
: '../../../public/img/analysis/tower-total-analy.png') +
')',
}"
>
<div class="analy-total" :style="{
height: area == 1 ? '26.937rem' : '24.937rem',
backgroundImage:
'url(' +
require(area == 1
? '../../../public/img/analysis/total-analy.png'
: '../../../public/img/analysis/tower-total-analy.png') +
')',
}">
<p class="yq-title">{{ area == 1 ? "园区" : "塔台" }}能耗总体情况</p>
<div class="change-time">
<div
@click="selectDate(1)"
:style="{ backgroundColor: choseTime == 1 ? 'rgb(8,166,255)' : '' }"
>
<div @click="selectDate(1)" :style="{ backgroundColor: choseTime == 1 ? 'rgb(8,166,255)' : '' }">
</div>
<div
@click="selectDate(2)"
:style="{ backgroundColor: choseTime == 2 ? 'rgb(8,166,255)' : '' }"
>
<div @click="selectDate(2)" :style="{ backgroundColor: choseTime == 2 ? 'rgb(8,166,255)' : '' }">
</div>
<div
@click="selectDate(3)"
:style="{ backgroundColor: choseTime == 3 ? 'rgb(8,166,255)' : '' }"
>
<div @click="selectDate(3)" :style="{ backgroundColor: choseTime == 3 ? 'rgb(8,166,255)' : '' }">
</div>
</div>
@ -39,203 +27,128 @@
<img src="../../../public/img/analysis/total-icon.png" />
<div class="analy-total-detail-all-left">
消耗量
<span class="big-size"
><span>{{
(consumeSituation.totalKgce + "").substring(".") > 2
? consumeSituation.totalKgce.toFixed(2)
: consumeSituation.totalKgce
}}</span
>kgce</span
>
<span style="margin-left: 1.25rem; margin-right: 0.312rem"
>同比</span
>
<img
class="compare"
:src="
srcImg(
consumeSituation.totalKgce,
consumeSituation.preTotalKgce
)
"
/>
<span
:style="{
color: styleColor(
consumeSituation.totalKgce,
consumeSituation.preTotalKgce
),
}"
>{{
consumePercent(
consumeSituation.totalKgce,
consumeSituation.preTotalKgce
)
}}%</span
>
<span class="big-size"><span>{{
(consumeSituation.totalKgce + "").substring(".") > 2
? consumeSituation.totalKgce.toFixed(2)
: consumeSituation.totalKgce
}}</span>kgce</span>
<span style="margin-left: 1.25rem; margin-right: 0.312rem">同比</span>
<img class="compare" :src="
srcImg(
consumeSituation.totalKgce,
consumeSituation.preTotalKgce
)
" />
<span :style="{
color: styleColor(
consumeSituation.totalKgce,
consumeSituation.preTotalKgce
),
}">{{
consumePercent(
consumeSituation.totalKgce,
consumeSituation.preTotalKgce
)
}}%</span>
</div>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-all-center">
单位面积总能耗
<span
><span>{{ consumeSituation.unitAreaTotalKgce }}</span
>kgce</span
>
<span><span>{{ consumeSituation.unitAreaTotalKgce }}</span>kgce</span>
</p>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-all-right">
人均能耗
<span
><span>{{ consumeSituation.unitPersonTotalKgce }}</span
>kgce</span
>
<span><span>{{ consumeSituation.unitPersonTotalKgce }}</span>kgce</span>
</p>
</div>
<div class="analy-total-detail-electric" style="margin-top: 1.875rem">
<img src="../../../public/img/analysis/electric-icon.png" />
<div class="analy-total-detail-electric-left">
消耗量
<span class="big-size"
><span>{{ consumeSituation.elect }}</span
>kw·h</span
>
<span style="margin-left: 1.25rem; margin-right: 0.312rem"
>同比</span
>
<img
class="compare"
:src="srcImg(consumeSituation.elect, consumeSituation.preElect)"
/>
<span
:style="{
color: styleColor(
consumeSituation.elect,
consumeSituation.preElect
),
}"
>{{
consumePercent(
consumeSituation.elect,
consumeSituation.preElect
)
}}%</span
>
<span class="big-size"><span>{{ consumeSituation.elect }}</span>kw·h</span>
<span style="margin-left: 1.25rem; margin-right: 0.312rem">同比</span>
<img class="compare" :src="srcImg(consumeSituation.elect, consumeSituation.preElect)" />
<span :style="{
color: styleColor(
consumeSituation.elect,
consumeSituation.preElect
),
}">{{
consumePercent(
consumeSituation.elect,
consumeSituation.preElect
)
}}%</span>
</div>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-electric-center">
单位面积耗电量
<span
><span>{{ consumeSituation.unitAreaElect }}</span
>kw·h</span
>
<span><span>{{ consumeSituation.unitAreaElect }}</span>kw·h</span>
</p>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-electric-right">
人均能耗
<span
><span>{{ consumeSituation.unitPersonElect }}</span
>kw·h</span
>
<span><span>{{ consumeSituation.unitPersonElect }}</span>kw·h</span>
</p>
</div>
<div
class="analy-total-detail-water"
:style="{ marginTop: area == 1 ? '1.875rem' : '2.812rem' }"
>
<div class="analy-total-detail-water" :style="{ marginTop: area == 1 ? '1.875rem' : '2.812rem' }">
<img src="../../../public/img/analysis/water-icon.png" />
<div class="analy-total-detail-water-left">
消耗量
<span class="big-size"
><span>{{ consumeSituation.water }}</span
></span
>
<span style="margin-left: 1.25rem; margin-right: 0.312rem"
>同比</span
>
<img
class="compare"
:src="srcImg(consumeSituation.water, consumeSituation.preWater)"
/>
<span
:style="{
color: styleColor(
consumeSituation.water,
consumeSituation.preWater
),
}"
>
<span class="big-size"><span>{{ consumeSituation.water }}</span></span>
<span style="margin-left: 1.25rem; margin-right: 0.312rem">同比</span>
<img class="compare" :src="srcImg(consumeSituation.water, consumeSituation.preWater)" />
<span :style="{
color: styleColor(
consumeSituation.water,
consumeSituation.preWater
),
}">
{{
consumePercent(
consumeSituation.water,
consumeSituation.preWater
)
}}%</span
>
}}%</span>
</div>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-water-center">
单位面积耗水量
<span
><span>{{ consumeSituation.unitAreaWater }}</span
></span
>
<span><span>{{ consumeSituation.unitAreaWater }}</span></span>
</p>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-water-right">
人均能耗
<span
><span>{{ consumeSituation.unitPersonWater }}</span
></span
>
<span><span>{{ consumeSituation.unitPersonWater }}</span></span>
</p>
</div>
<div
class="analy-total-detail-warm"
style="margin-top: 1.875rem"
v-show="area == 1"
>
<div class="analy-total-detail-warm" style="margin-top: 1.875rem" v-show="area == 1">
<img src="../../../public/img/analysis/warm-icon.png" />
<div class="analy-total-detail-warm-left">
消耗量
<span class="big-size"
><span>{{ consumeSituation.heat }}</span
>MJ</span
>
<span style="margin-left: 1.25rem; margin-right: 0.312rem"
>同比</span
>
<img
class="compare"
:src="srcImg(consumeSituation.heat, consumeSituation.preHeat)"
/>
<span
:style="{
color: styleColor(
consumeSituation.heat,
consumeSituation.preHeat
),
}"
>
<span class="big-size"><span>{{ consumeSituation.heat }}</span>MJ</span>
<span style="margin-left: 1.25rem; margin-right: 0.312rem">同比</span>
<img class="compare" :src="srcImg(consumeSituation.heat, consumeSituation.preHeat)" />
<span :style="{
color: styleColor(
consumeSituation.heat,
consumeSituation.preHeat
),
}">
{{
consumePercent(consumeSituation.heat, consumeSituation.preHeat)
}}%</span
>
}}%</span>
</div>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-warm-center">
单位面积耗热量
<span
><span>{{ consumeSituation.unitAreaHeat }}</span
>MJ</span
>
<span><span>{{ consumeSituation.unitAreaHeat }}</span>MJ</span>
</p>
<!-- <div class="border-line"></div> -->
<p class="analy-total-detail-warm-right">
人均能耗
<span
><span>{{ consumeSituation.unitPersonHeat }}</span
>MJ</span
>
<span><span>{{ consumeSituation.unitPersonHeat }}</span>MJ</span>
</p>
</div>
</div>
@ -282,6 +195,7 @@ export default {
},
unitData: [],
peopleData: [],
intervalTime2: null,
};
},
computed: {
@ -317,8 +231,18 @@ export default {
};
},
},
beforeDestroy() {
if (this.intervalTime2) {
console.log('clearInterval2')
clearInterval(this.intervalTime2);
this.intervalTime2 = null;
}
},
mounted() {
this.getData();
this.intervalTime2 = setInterval(() => {
this.getData();
}, 30 * 60 * 1000)
},
methods: {
getData() {

@ -73,14 +73,25 @@
floorFive: '',
floorSix: '',
},
intervalTime: null,
}
},
beforeDestroy() {
if(this.intervalTime){
console.log('clearInterval')
clearInterval(this.intervalTime);
this.intervalTime = null;
}
},
mounted() {
this.getPercentPie();
this.getPercentBar();
this.getData()
this.getData();
this.intervalTime = setInterval(() => {
this.getPercentPie();
this.getPercentBar();
this.getData();
},30*60*1000)
},
methods: {
selectDate(i) {

@ -22,7 +22,7 @@
<script>
import lineCharts from './components/lineCharts'
import { getMonth } from '@/util/commonValue'
// import { getMonth } from '@/util/commonValue'
import { dateFormat } from "@/util/date";
import { getYearLine, getBuildElect } from '@/api/source/total'
export default {
@ -42,15 +42,23 @@ export default {
buildValue: [
[20, 30, 40, 87, 74, 47, 59, 200, 200, 128, 128, 198],
[37, 48, 85, 38, 58, 98, 100, 163, 198, 183, 123, 87],
]
],
intervalTime3: null,
}
},
beforeDestroy() {
if (this.intervalTime3) {
console.log('clearInterval3')
clearInterval(this.intervalTime3);
this.intervalTime3 = null;
}
},
mounted() {
this.getCharts();
setTimeout(() => {
this.intervalTime3 = setInterval(() => {
this.getCharts();
}, 3600000)
}, 30*60*1000)
},
methods: {

Loading…
Cancel
Save