|
@ -112,17 +112,17 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="content-box"> |
|
|
<div class="content-box"> |
|
|
<div class="box-title " style="margin-top: 15px;"> |
|
|
<div class="box-title " style="margin-top: 15px;"> |
|
|
<span>今日发电统计</span> |
|
|
<span>今日发电趋势</span> |
|
|
<span style="color:#2AD9FD;margin-left: 140px;">总计:{{ chart1Total1 }}度</span> |
|
|
<span style="color:#2AD9FD;margin-left: 140px;">总计:{{ chart1Total1 }}度</span> |
|
|
</div> |
|
|
</div> |
|
|
<div id="charts1" class="chart"></div> |
|
|
<div id="charts1" class="chart"></div> |
|
|
<div class="box-title " style="margin-top: 15px;"> |
|
|
<div class="box-title " style="margin-top: 15px;"> |
|
|
<span>今日用电统计</span> |
|
|
<span>今日用电趋势</span> |
|
|
<span style="color:#FFCD4D;margin-left: 140px;">总计:{{ chart1Total1 }}度</span> |
|
|
<span style="color:#FFCD4D;margin-left: 140px;">总计:{{ chart1Total2 }}度</span> |
|
|
</div> |
|
|
</div> |
|
|
<div id="charts2" class="chart"></div> |
|
|
<div id="charts2" class="chart"></div> |
|
|
<div class="box-title " style="margin-top: 15px;"> |
|
|
<div class="box-title " style="margin-top: 15px;"> |
|
|
<span>今日功率统计</span> |
|
|
<span>今日功率趋势</span> |
|
|
<span style="color:#04BFAE;margin-left: 140px;">总计:{{ chart1Total3 }}千瓦</span> |
|
|
<span style="color:#04BFAE;margin-left: 140px;">总计:{{ chart1Total3 }}千瓦</span> |
|
|
</div> |
|
|
</div> |
|
|
<div id="charts3" class="chart"></div> |
|
|
<div id="charts3" class="chart"></div> |
|
@ -429,11 +429,13 @@ export default { |
|
|
const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
|
|
const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
|
|
let total = 0; |
|
|
let total = 0; |
|
|
for(let i in result.data){ |
|
|
for(let i in result.data){ |
|
|
total += result.data[i] |
|
|
//total += result.data[i] |
|
|
const idx = parseInt(i.substr(11,2)); |
|
|
const idx = parseInt(i.substr(11,2)); |
|
|
data[idx] = result.data[i]; |
|
|
data[idx] = result.data[i]; |
|
|
} |
|
|
} |
|
|
this.chart1Total1 = total; |
|
|
const lastKey = Object.keys(result.data)[Object.keys(result.data).length - 1]; |
|
|
|
|
|
this.chart1Total1 = result.data[lastKey]; |
|
|
|
|
|
|
|
|
option1.series[0].data = data; |
|
|
option1.series[0].data = data; |
|
|
this.chart1.setOption(option1); |
|
|
this.chart1.setOption(option1); |
|
|
this.chart1.resize(); |
|
|
this.chart1.resize(); |
|
@ -471,11 +473,14 @@ export default { |
|
|
const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
|
|
const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
|
|
let total = 0; |
|
|
let total = 0; |
|
|
for(let i in result.data){ |
|
|
for(let i in result.data){ |
|
|
total += result.data[i] |
|
|
// total += result.data[i] |
|
|
const idx = parseInt(i.substr(11,2)); |
|
|
const idx = parseInt(i.substr(11,2)); |
|
|
data[idx] = result.data[i]; |
|
|
data[idx] = result.data[i]; |
|
|
} |
|
|
} |
|
|
this.chart1Total2 = total; |
|
|
const lastKey = Object.keys(result.data)[Object.keys(result.data).length - 1]; |
|
|
|
|
|
this.chart1Total2 = result.data[lastKey]; |
|
|
|
|
|
|
|
|
|
|
|
// this.chart1Total2 = total; |
|
|
option2.series[0].data = data; |
|
|
option2.series[0].data = data; |
|
|
this.chart2.setOption(option2); |
|
|
this.chart2.setOption(option2); |
|
|
this.chart2.resize(); |
|
|
this.chart2.resize(); |
|
@ -515,11 +520,13 @@ export default { |
|
|
const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
|
|
const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |
|
|
let total = 0; |
|
|
let total = 0; |
|
|
for(let i in result.data){ |
|
|
for(let i in result.data){ |
|
|
total += result.data[i] |
|
|
//total += result.data[i] |
|
|
const idx = parseInt(i.substr(11,2)); |
|
|
const idx = parseInt(i.substr(11,2)); |
|
|
data[idx] = result.data[i]; |
|
|
data[idx] = result.data[i]; |
|
|
} |
|
|
} |
|
|
this.chart1Total3 = total; |
|
|
const lastKey = Object.keys(result.data)[Object.keys(result.data).length - 1]; |
|
|
|
|
|
this.chart1Total3 = result.data[lastKey]; |
|
|
|
|
|
// this.chart1Total3 = total; |
|
|
option3.series[0].data = data; |
|
|
option3.series[0].data = data; |
|
|
this.chart3.setOption(option3); |
|
|
this.chart3.setOption(option3); |
|
|
this.chart3.resize() |
|
|
this.chart3.resize() |
|
|