|
@@ -11,14 +11,14 @@
|
|
|
<div id="peakToValley" style="width:100%;height:2.5rem;"></div>
|
|
|
</div>
|
|
|
<div class="d-flex jc-center body-box" style=" margin-top: 0;height: 60px">
|
|
|
- <div class="fontElec"><p class="title-p">发电量</p><p class="title-p2">2264.0</p></div>
|
|
|
+ <div class="fontElec"><p class="title-p">发电量</p><p class="title-p2">{{this.dashboarddayelec.ypg}}</p></div>
|
|
|
</div>
|
|
|
<div class="d-flex jc-center body-box" style=" margin-top: 0;height: 60px">
|
|
|
- <div class="fontElec"><p class="title-p">倒电量</p> <p class="title-p2">853.0</p></div>
|
|
|
+ <div class="fontElec"><p class="title-p">倒电量</p> <p class="title-p2">{{this.dashboarddayelec.daodianliang}}</p></div>
|
|
|
|
|
|
</div>
|
|
|
<div class="d-flex jc-center body-box" style=" margin-top: 0;height: 60px">
|
|
|
- <div class="fontElec"><p class="title-p">用电量</p><p class="title-p2">1872.0</p></div>
|
|
|
+ <div class="fontElec"><p class="title-p">用电量</p><p class="title-p2">{{this.dashboarddayelec.eveLec}}</p></div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
@@ -27,9 +27,8 @@
|
|
|
|
|
|
<script>
|
|
|
import centreRight2Chart1 from "@/components/echart/centreRight2/centreRight2Chart1";
|
|
|
- props:[]
|
|
|
-
|
|
|
export default {
|
|
|
+ props:['dashboardelecdata'],
|
|
|
data() {
|
|
|
return {
|
|
|
config: {
|
|
@@ -52,7 +51,9 @@
|
|
|
},
|
|
|
],
|
|
|
showValue: true
|
|
|
- }
|
|
|
+ },
|
|
|
+ dashboarddayelec:this.dashboardelecdata[0],
|
|
|
+ dashboarddayelecmonth:this.dashboardelecdata[1]
|
|
|
};
|
|
|
},
|
|
|
components: { centreRight2Chart1 },
|
|
@@ -63,6 +64,12 @@
|
|
|
initChart() {
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
|
this.chart = this.echarts.init(document.getElementById('peakToValley'))
|
|
|
+ const dateDay = [];
|
|
|
+ const dateNum = [];
|
|
|
+ for (let i = 0; i < this.dashboarddayelecmonth.length; i++) {
|
|
|
+ dateDay[i] = this.dashboarddayelecmonth[i].dateDay;
|
|
|
+ dateNum[i] = this.dashboarddayelecmonth[i].fenggucha;
|
|
|
+ }
|
|
|
|
|
|
this.chart.setOption({
|
|
|
/* 周围边距 */
|
|
@@ -82,7 +89,8 @@
|
|
|
xAxis: [
|
|
|
{
|
|
|
type: 'category',
|
|
|
- data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
|
|
|
+ // data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
|
|
|
+ data:dateDay,
|
|
|
axisTick: {
|
|
|
alignWithLabel: true
|
|
|
}
|
|
@@ -104,7 +112,8 @@
|
|
|
{ type: 'min', name: 'Min' }
|
|
|
]
|
|
|
},
|
|
|
- data: [10, 52, 20, 33, 30, 30, -34, 10, 33, 20, 33, 30, 30, -13, 10, 12, 20, 33, 30, 30, -20, 10, 43, 20, 33, 30, 30, -20, 12, 45, -11]
|
|
|
+ // data: [10, 52, 20, 33, 30, 30, -34, 10, 33, 20, 33, 30, 30, -13, 10, 12, 20, 33, 30, 30, -20, 10, 43, 20, 33, 30, 30, -20, 12, 45, -11]
|
|
|
+ data:dateNum,
|
|
|
}
|
|
|
]
|
|
|
})
|