代码提交

This commit is contained in:
ym1026
2025-09-12 11:43:32 +08:00
parent f0720439d2
commit 1a66c87a5a
23 changed files with 63 additions and 198 deletions

View File

@@ -117,7 +117,22 @@ export default {
this.getStatDayList(1),
this.getStatDayList(2),
this.getStatDayList(3)
])
]).then((r)=>{
if (
this.deviceInfo.energy.length &&
this.deviceInfo.charge.length &&
this.deviceInfo.pv.length
) {
const newArr = this.mergedArray(
this.deviceInfo.energy,
this.deviceInfo.charge,
this.deviceInfo.pv
)
this.deviceInfo.alarm = newArr
}
console.log(r,'11111')
})
// this.showFlag=true
},
@@ -189,6 +204,7 @@ export default {
// 示例获取7天前的日期
// 查询场站日统计信息
async getStatDayList(category) {
console.log(category,"category")
try {
// station_id: 场站ID
// category: 类别: 1储能设备,2:充电设备,3:光伏设备
@@ -205,18 +221,7 @@ export default {
if (res.errcode === 0) {
this.list.forEach((item) => {
this.deviceInfo[arr[category]] = res.data
if (
this.deviceInfo.energy.length &&
this.deviceInfo.charge.length &&
this.deviceInfo.pv.length
) {
const newArr = this.mergedArray(
this.deviceInfo.energy,
this.deviceInfo.charge,
this.deviceInfo.pv
)
this.deviceInfo.alarm = newArr
}
})
} else {
throw res