|
@@ -31,14 +31,10 @@
|
|
|
<p class='ev-top Micbold'>室内温度满足率</p>
|
|
|
<div class='ev-bottom'>
|
|
|
<div class='ev-bottom-left'>
|
|
|
- <ev-satisfaction-rate :tindoorFillRate='tindoorFillRate'></ev-satisfaction-rate>
|
|
|
+ <div id='rate1' style='width:100%;height:100%;'></div>
|
|
|
</div>
|
|
|
<div class='ev-bottom-right MicrYaHei'>
|
|
|
- <p>
|
|
|
- <!-- <span>超限时长</span>
|
|
|
- <span>{{'--'}}</span>
|
|
|
- <span>h/日</span>-->
|
|
|
- </p>
|
|
|
+ <p></p>
|
|
|
<p>
|
|
|
<span>超限程度</span>
|
|
|
<span>{{tindoorOverrunDegree}}</span>
|
|
@@ -51,7 +47,7 @@
|
|
|
<p class='ev-top'>节能率</p>
|
|
|
<div class='ev-bottom'>
|
|
|
<div class='ev-bottom-left'>
|
|
|
- <ev-energy-saving-rate :energySavingRate='energySavingRate'></ev-energy-saving-rate>
|
|
|
+ <div id='rate2' style='width:100%;height:100%;'></div>
|
|
|
</div>
|
|
|
<div class='ev-bottom-right'>
|
|
|
<p>
|
|
@@ -66,7 +62,7 @@
|
|
|
<p class='ev-top'>策略执行率</p>
|
|
|
<div class='ev-bottom'>
|
|
|
<div class='ev-bottom-left'>
|
|
|
- <ev-implementation-rate :chillerExecuteRate='chillerExecuteRate'></ev-implementation-rate>
|
|
|
+ <div id='rate3' style='width:100%;height:100%;'></div>
|
|
|
</div>
|
|
|
<div class='ev-bottom-right'>
|
|
|
<p>
|
|
@@ -90,10 +86,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import echarts from 'echarts'
|
|
|
import Head from '../main/index'
|
|
|
-import EvEnergySavingRate from './evEnergySavingRate'
|
|
|
-import EvImplementationRate from './evImplementationRate'
|
|
|
-import EvSatisfactionRate from './evSatisfactionRate'
|
|
|
import EvIndoorTemperature from './evIndoorTemperature'
|
|
|
import { runDataQury } from '@/api/evaluate/evaluate.js'
|
|
|
import moment from 'moment'
|
|
@@ -129,9 +123,6 @@ export default {
|
|
|
},
|
|
|
components: {
|
|
|
Head,
|
|
|
- EvEnergySavingRate,
|
|
|
- EvImplementationRate,
|
|
|
- EvSatisfactionRate,
|
|
|
EvIndoorTemperature
|
|
|
},
|
|
|
mounted() {
|
|
@@ -141,6 +132,57 @@ export default {
|
|
|
...mapGetters(['projects', 'projectId'])
|
|
|
},
|
|
|
methods: {
|
|
|
+ rate(pieData, box, colors) {
|
|
|
+ const myChart = echarts.init(document.querySelector(box))
|
|
|
+ const data = pieData
|
|
|
+ const option = {
|
|
|
+ grid: {
|
|
|
+ top: 5,
|
|
|
+ bottom: 5
|
|
|
+ },
|
|
|
+ color: colors,
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: 'valueOfMarket',
|
|
|
+ type: 'pie',
|
|
|
+ center: ['50%', '50%'],
|
|
|
+ radius: ['60%', '70%'],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ hoverAnimation: false,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: true,
|
|
|
+ position: 'center',
|
|
|
+ color: '#000000',
|
|
|
+ fontSize: 20,
|
|
|
+ lineHeight: 0,
|
|
|
+ formatter: '{b}\n{c}%'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ value: data,
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 100 - data,
|
|
|
+ name: '',
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ myChart.setOption(option)
|
|
|
+ },
|
|
|
formatter(date) {
|
|
|
return moment.unix(date / 1000).format('YYYYMMDD')
|
|
|
},
|
|
@@ -161,54 +203,48 @@ export default {
|
|
|
}
|
|
|
runDataQury(null, { getParams }).then(res => {
|
|
|
if (res.result == 'success') {
|
|
|
- this.tindoorFillRate = res.tindoorFillRate != undefined ? res.tindoorFillRate.toFixed(1) : 0 //室内温度满足率
|
|
|
+ this.tindoorFillRate = res.tindoorFillRate != undefined && res.tindoorFillRate != -9999 ? res.tindoorFillRate.toFixed(1) : 0 //室内温度满足率
|
|
|
console.log('室内温度满足率', this.tindoorFillRate)
|
|
|
- this.energySavingRate = res.energySavingRate != undefined ? res.energySavingRate.toFixed(1) : 0 //节能率
|
|
|
+ this.energySavingRate = res.energySavingRate != undefined && res.energySavingRate != -9999 ? res.energySavingRate.toFixed(1) : 0 //节能率
|
|
|
console.log('节能率', this.energySavingRate)
|
|
|
- this.chillerExecuteRate = res.chillerExecuteRate != undefined ? res.chillerExecuteRate.toFixed(1) : 0 //略执行率
|
|
|
+ this.chillerExecuteRate =
|
|
|
+ res.chillerExecuteRate != undefined && res.chillerExecuteRate != -9999 ? res.chillerExecuteRate.toFixed(1) : 0 //略执行率
|
|
|
console.log('略执行率', this.chillerExecuteRate)
|
|
|
- this.energySaving = res.energySaving != undefined ? res.energySaving.toFixed(0) : 0 //节能量
|
|
|
+ this.energySaving = res.energySaving != undefined && res.energySaving != -9999 ? res.energySaving.toFixed(0) : 0 //节能量
|
|
|
console.log('节能量', this.energySaving)
|
|
|
this.isExecutedNum = res.isExecutedNum //已执行数量
|
|
|
console.log('已执行数量', this.isExecutedNum)
|
|
|
this.allReceivedNum = res.allReceivedNum //共收到数量
|
|
|
console.log('共收到数量', this.allReceivedNum)
|
|
|
- this.tindoorOverrunDegree = res.tindoorOverrunDegree != undefined ? res.tindoorOverrunDegree.toFixed(1) : 0 //超限程度
|
|
|
+ this.tindoorOverrunDegree =
|
|
|
+ res.tindoorOverrunDegree != undefined && res.tindoorOverrunDegree != -9999 ? res.tindoorOverrunDegree.toFixed(1) : 0 //超限程度
|
|
|
console.log('超限程度', this.tindoorOverrunDegree)
|
|
|
- this.energyDataList = res.dataList
|
|
|
+ this.energyDataList = res.dataList ? res.dataList : []
|
|
|
+ this.queryRate()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ queryRate() {
|
|
|
+ if (this.tindoorFillRate) {
|
|
|
+ this.rate(this.tindoorFillRate, '#rate1', ['#0091FF', '#E1F2FF'])
|
|
|
+ }
|
|
|
+ if (this.energySavingRate) {
|
|
|
+ this.rate(this.energySavingRate, '#rate2', ['#FFBA6B', '#FEE9D2'])
|
|
|
+ }
|
|
|
+ if (this.chillerExecuteRate) {
|
|
|
+ this.rate(this.chillerExecuteRate, '#rate3', ['#00D6B9', '#D5F6F2'])
|
|
|
+ }
|
|
|
+ },
|
|
|
daterangeLeft() {
|
|
|
if (this.pickerVal2.length > 0) {
|
|
|
- // let dateTime = new Date(this.pickerVal2[0]);
|
|
|
- // let newData = this.formatter(
|
|
|
- // new Date(dateTime.setDate(dateTime.getDate() - 1))
|
|
|
- // );
|
|
|
this.pickerVal2[0] = this.pickerVal2[0] - 24 * 60 * 60 * 1000
|
|
|
this.pickerVal2[1] = this.pickerVal2[1] - 24 * 60 * 60 * 1000
|
|
|
- // this.pickerVal2[0] =
|
|
|
- // newData.slice(0, 4) +
|
|
|
- // "." +
|
|
|
- // newData.slice(4, 6) +
|
|
|
- // "." +
|
|
|
- // newData.slice(6, 8);
|
|
|
this.pickerVal2 = [this.pickerVal2[0], this.pickerVal2[1]]
|
|
|
this.query(0)
|
|
|
}
|
|
|
},
|
|
|
daterangeRight() {
|
|
|
if (this.pickerVal2.length > 0) {
|
|
|
- // let dateTime = new Date(this.pickerVal2[1]);
|
|
|
- // let newData = this.formatter(
|
|
|
- // new Date(dateTime.setDate(dateTime.getDate() + 1))
|
|
|
- // );
|
|
|
- // this.pickerVal2[1] =
|
|
|
- // newData.slice(0, 4) +
|
|
|
- // "." +
|
|
|
- // newData.slice(4, 6) +
|
|
|
- // "." +
|
|
|
- // newData.slice(6, 8);
|
|
|
let end = this.formatter(new Date().getTime() - 24 * 60 * 60 * 1000)
|
|
|
if (this.formatter(this.pickerVal2[1]) == end) {
|
|
|
this.pickerVal2[1] = new Date().getTime() - 24 * 60 * 60 * 1000
|