mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
代码提交
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user