From 1aefeef4098385b002aa0d9332b4834496a31ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Thu, 21 Nov 2024 09:30:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E9=98=B3=E8=83=BD=E6=9D=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintenanceOperations/solar/index.vue | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue index 4e533b25..811cbe85 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue @@ -112,17 +112,17 @@
- 今日发电统计 + 今日发电趋势 总计:{{ chart1Total1 }}度
- 今日用电统计 - 总计:{{ chart1Total1 }}度 + 今日用电趋势 + 总计:{{ chart1Total2 }}度
- 今日功率统计 + 今日功率趋势 总计:{{ chart1Total3 }}千瓦
@@ -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] let total = 0; for(let i in result.data){ - total += result.data[i] + //total += result.data[i] const idx = parseInt(i.substr(11,2)); 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; this.chart1.setOption(option1); 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] let total = 0; for(let i in result.data){ - total += result.data[i] + // total += result.data[i] const idx = parseInt(i.substr(11,2)); 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; this.chart2.setOption(option2); 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] let total = 0; for(let i in result.data){ - total += result.data[i] + //total += result.data[i] const idx = parseInt(i.substr(11,2)); 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; this.chart3.setOption(option3); this.chart3.resize() @@ -690,7 +697,7 @@ export default { align-items: center; flex-direction: column; gap: 15px; - width:240px; + width:240px; .d1 { display:flex; justify-content: center; @@ -744,7 +751,7 @@ export default { gap: 3px; >div { - + width: 5px; height: 17px; } @@ -755,7 +762,7 @@ export default { .content-kk { display: flex; flex-direction: row; - + margin-right: 3px; gap: 3px;