|
|
@ -141,6 +141,13 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
EnergyExpend().then(e => {
|
|
|
|
EnergyExpend().then(e => {
|
|
|
|
this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2)
|
|
|
|
this.expend = e.map(v => v.expend).reduce((a, b) => a + b, 0).toFixed(2)
|
|
|
|
|
|
|
|
let data = e.map(v=>{
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
...v,
|
|
|
|
|
|
|
|
monitorName:parseFloat(v.monitorName.split(' - ')?.[1]?.split('(')?.[0])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
data.sort((a,b)=>a.monitorName-b.monitorName)
|
|
|
|
|
|
|
|
|
|
|
|
let option2 = {
|
|
|
|
let option2 = {
|
|
|
|
grid: {
|
|
|
|
grid: {
|
|
|
@ -165,7 +172,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
data: e.map(v => parseFloat(v.monitorName.split(' - ')?.[1]?.split('(')?.[0]) + "#"),
|
|
|
|
data: data.map(v => v.monitorName + "#"),
|
|
|
|
axisLine: {
|
|
|
|
axisLine: {
|
|
|
|
show: true, //隐藏X轴轴线
|
|
|
|
show: true, //隐藏X轴轴线
|
|
|
|
lineStyle: {
|
|
|
|
lineStyle: {
|
|
|
@ -234,7 +241,7 @@ export default {
|
|
|
|
// areaStyle: {
|
|
|
|
// areaStyle: {
|
|
|
|
// color: "rgba(5,140,255, 0.2)",
|
|
|
|
// color: "rgba(5,140,255, 0.2)",
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
data: e.map(v => parseFloat(v.expend)),
|
|
|
|
data: data.map(v => parseFloat(v.expend)),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
]
|
|
|
|
};
|
|
|
|
};
|
|
|
|