diff --git a/src/views/index.vue b/src/views/index.vue
index c32a555..670c3fc 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -74,13 +74,13 @@
label-width="200"
>
- 1233
- 545456
- 566452
- 71233
- 566452
- 8233
- 8233
+ {{runtimeSummary.totalRunHours}}
+ {{runtimeSummary.totalChargeHours}}
+ {{runtimeSummary.totalDischargeHours}}
+ {{runtimeSummary.totalChargeEnergyKWh}}
+ {{runtimeSummary.totalDischargeEnergyKWh}}
+ {{runtimeSummary.totalDischargeCapacityAh}}
+ {{runtimeSummary.totalChargeCapacityAh}}
@@ -129,10 +129,14 @@ import {
let onlinnum = ref(0)
let gznum = ref(0)
+ let runtimeSummary = ref({})
+
let sbdata = []
let markerlist = []
+let yxscx = []
+let yxscy = []
nextTick(() => {
equdata().then(rps => {
@@ -141,6 +145,8 @@ nextTick(() => {
onlinnum.value = rps.data.summary.onlineCount
gznum.value = rps.data.summary.faultCount
+ runtimeSummary.value = rps.data.runtimeSummary
+
sbdata = rps.data.socDistribution
if(rps.data.trend && rps.data.trend.length > 0){
@@ -148,13 +154,23 @@ nextTick(() => {
return n.date
})
chond.value = rps.data.trend.map(n => {
- return n.date.chargeDuration
+ return n.chargeDuration
})
fangd.value = rps.data.trend.map(n => {
- return n.date.dischargeDuration
+ return n.dischargeDuration
})
}
-
+
+ if(rps.data.runtimeDuration && rps.data.runtimeDuration.length > 0){
+ yxscx = rps.data.runtimeDuration.map(n => {
+ return n.name
+ })
+
+ yxscy = rps.data.runtimeDuration.map(n => {
+ return n.value
+ })
+ }
+
sbinit()
@@ -430,7 +446,7 @@ function ricfdinit() {
// max: 50,
// interval: 50,
axisLabel: {
- formatter: "{value}h",
+ formatter: "{value}s",
},
},
],
@@ -726,7 +742,7 @@ function yxscinit() {
xAxis: [
{
type: "category",
- data:["10h", "50h", "100h", "150h", "200h", "250h", "300h"],
+ data:yxscx, //["10h", "50h", "100h", "150h", "200h", "250h", "300h"],
axisPointer: {
type: "shadow",
},
@@ -753,7 +769,7 @@ function yxscinit() {
},
},
barWidth:'20px',
- data:[80.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
+ data:yxscy, //[80.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
itemStyle: {
//柱形图圆角,鼠标移上去效果,如果只是一个数字则说明四个参数全部设置为那么多
normal: {