|
@@ -15,34 +15,39 @@
|
|
|
<li :class="{current: num==3}" @click="change(3)">执行率</li>
|
|
|
</div>
|
|
|
<div class="count-top-right">
|
|
|
- <date-temp :types="0" @pickerVal="pickerVal"></date-temp>
|
|
|
+ <date-temp :types="0" @pickerVal="pickerVal"></date-temp>
|
|
|
</div>
|
|
|
</ul>
|
|
|
<div class="count-bottom">
|
|
|
<div v-show="num == 1">
|
|
|
- <ev-rate-title :tab="1"></ev-rate-title>
|
|
|
+ <ev-rate-title :tab="1" :rate="tindoorFillRate"></ev-rate-title>
|
|
|
<div class="count-bottom-switch">
|
|
|
<span class="switchSpan">只显示不满足的点位</span>
|
|
|
<el-switch v-model="value2"></el-switch>
|
|
|
</div>
|
|
|
<div class="count-bottom-content">
|
|
|
- <ev-two-table :switch="value2"></ev-two-table>
|
|
|
+ <ev-two-table v-if="dataList.length>=0" :switch="value2" :dataList="dataList"></ev-two-table>
|
|
|
</div>
|
|
|
<div class="count-bottom-foot">
|
|
|
<ev-stacked-line></ev-stacked-line>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-show="num == 2">
|
|
|
- <ev-rate-title :tab="2"></ev-rate-title>
|
|
|
+ <ev-rate-title :tab="2" :rate="energySavingRate"></ev-rate-title>
|
|
|
<div class="count-historical-data">
|
|
|
- <ev-history></ev-history>
|
|
|
+ <ev-history
|
|
|
+ v-if="Object.keys(current).length>0||Object.keys(similarDay).length>0||Object.keys(maxArr).length>0"
|
|
|
+ :current="current"
|
|
|
+ :similarDay="similarDay"
|
|
|
+ :maxArr="maxArr"
|
|
|
+ ></ev-history>
|
|
|
<div class="count-foot">
|
|
|
<div class="count-foot-title">
|
|
|
<span class="Micbold">相似日概况</span>
|
|
|
<span class="MicrYaHei">相似度高</span>
|
|
|
</div>
|
|
|
<div class="count-foot-table">
|
|
|
- <ev-energy-table></ev-energy-table>
|
|
|
+ <ev-energy-table v-if="samples.length>0" :samples="samples"></ev-energy-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -65,6 +70,7 @@ import EvCard from "./evCard"; //执行率
|
|
|
import EvRateTitle from "./evRateTitle";
|
|
|
import EvHistory from "./evHistory";
|
|
|
import DateTemp from "./dateTemp";
|
|
|
+import { runDataQury, energyDayQuery } from "@/api/evaluate/evaluate.js";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -72,6 +78,18 @@ export default {
|
|
|
headText: "运行评价",
|
|
|
num: 1,
|
|
|
value2: true,
|
|
|
+ current: {},
|
|
|
+ similarDay: {},
|
|
|
+ samples: [],
|
|
|
+ maxArr: [],
|
|
|
+ chillerExecuteRate: "", //略执行率
|
|
|
+ isExecutedNum: "", //已执行数量
|
|
|
+ allReceivedNum: "", //共收到数量
|
|
|
+ dataList: [], //室内温度满足率
|
|
|
+ energySaving: "", //节能量
|
|
|
+ tindoorOverrunDegree: "", //超限程度
|
|
|
+ tindoorFillRate: "", //室内温度满足率
|
|
|
+ energySavingRate: "", //节能率
|
|
|
cardList: [
|
|
|
{
|
|
|
a: "08:30",
|
|
@@ -132,16 +150,80 @@ export default {
|
|
|
EvHistory,
|
|
|
DateTemp
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ this.start();
|
|
|
+ this.queryRunDataQury();
|
|
|
+ },
|
|
|
methods: {
|
|
|
change: function(index) {
|
|
|
this.num = index;
|
|
|
+ this.start();
|
|
|
+ },
|
|
|
+ start() {
|
|
|
+ if (this.num == 2) {
|
|
|
+ this.queryEnergyDayQuery();
|
|
|
+ }
|
|
|
},
|
|
|
pickerVal(val) {
|
|
|
console.log(val);
|
|
|
},
|
|
|
jumpIndex() {
|
|
|
this.$router.push("/evaluate");
|
|
|
+ },
|
|
|
+ queryRunDataQury() {
|
|
|
+ this.runDataQuryArr = [];
|
|
|
+ runDataQury({}).then(res => {
|
|
|
+ if (res.result == "success") {
|
|
|
+ this.chillerExecuteRate = res.chillerExecuteRate; //略执行率
|
|
|
+ this.isExecutedNum = res.isExecutedNum; //已执行数量
|
|
|
+ this.allReceivedNum = res.allReceivedNum; //共收到数量
|
|
|
+ this.dataList = res.dataList ? res.dataList : []; //室内温度满足率
|
|
|
+ this.energySaving = res.energySaving; //节能量
|
|
|
+ this.tindoorOverrunDegree = res.tindoorOverrunDegree; //超限程度
|
|
|
+ this.tindoorFillRate = res.tindoorFillRate; //室内温度满足率
|
|
|
+ this.energySavingRate = res.energySavingRate; //节能率
|
|
|
+ console.log(this.energySavingRate);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 节能率
|
|
|
+ queryEnergyDayQuery() {
|
|
|
+ energyDayQuery({}).then(res => {
|
|
|
+ // 本日概况
|
|
|
+ this.current = res.current ? res.current : {};
|
|
|
+ // 相似日概况
|
|
|
+ this.similarDay = res.similarDay ? res.similarDay : {};
|
|
|
+ // 相似日列表
|
|
|
+ this.samples = res.samples ? res.samples : [];
|
|
|
+ if (this.samples.length > 0) {
|
|
|
+ var outsiteTemp = [],
|
|
|
+ indoorTemp = [],
|
|
|
+ energy = [];
|
|
|
+ for (var i in this.samples) {
|
|
|
+ outsiteTemp.push(this.samples[i].outsiteTemp);
|
|
|
+ indoorTemp.push(this.samples[i].indoorTemp);
|
|
|
+ energy.push(this.samples[i].energy);
|
|
|
+ }
|
|
|
+ let maxOutsiteTemp = this.maxMethod(this.sortMethod(outsiteTemp)),
|
|
|
+ maxIndoorTemp = this.maxMethod(this.sortMethod(indoorTemp)),
|
|
|
+ maxEnergy = this.maxMethod(this.sortMethod(energy));
|
|
|
+ this.maxArr.push(maxOutsiteTemp, maxIndoorTemp, maxEnergy);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sortMethod(arr) {
|
|
|
+ if (arr instanceof Array) {
|
|
|
+ return arr.sort(function(num1, num2) {
|
|
|
+ return num1 - num2;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ maxMethod(arr) {
|
|
|
+ if (arr instanceof Array) {
|
|
|
+ return eval(arr[arr.length - 1]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|