|
@@ -5,7 +5,7 @@
|
|
|
<div class="history">
|
|
|
<span class="top-left"></span><span class="top-right"></span><span class="bottom-left"></span><span class="bottom-right"></span>
|
|
|
<div class="history-title">
|
|
|
- <div>
|
|
|
+ <div style="flex:1;">
|
|
|
<a-month-picker v-model="time" :format="BaseTool.Date.PICKER_NORM_YEAR_MONTH" @change="onMonthChange" @ok="onOk">
|
|
|
<span class="month">
|
|
|
<a-icon type="calendar" theme="filled" />
|
|
@@ -13,6 +13,8 @@
|
|
|
</a-month-picker>
|
|
|
{{ BaseTool.Date.formatter(time,BaseTool.Date.PICKER_NORM_YEAR_MONTH) }}
|
|
|
</div>
|
|
|
+ <div style="flex:1;text-align:center;color:#01D4F9;">{{ this.num }}(KWH)</div>
|
|
|
+ <div style="flex:1;"></div>
|
|
|
<!-- <div class="dateStatistics" style="float:left">
|
|
|
<a-button type="primary" @click="doExport()">导出</a-button>
|
|
|
</div>-->
|
|
@@ -63,7 +65,9 @@ export default {
|
|
|
time: '',
|
|
|
dataInfo: [],
|
|
|
title: [],
|
|
|
- total: []
|
|
|
+ total: [],
|
|
|
+ num: 0
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -90,6 +94,10 @@ export default {
|
|
|
})
|
|
|
return pre
|
|
|
}, [])
|
|
|
+ this.num = this.total.reduce((pre, item) => {
|
|
|
+ pre += item.positive
|
|
|
+ return pre
|
|
|
+ }, 0)
|
|
|
})
|
|
|
},
|
|
|
onMonthChange (value, dateString) {
|