bcm总览接口参数更新,电量指标没有返回数据时图表显示问题

This commit is contained in:
白菜
2025-07-02 16:57:34 +08:00
parent cacd939dd6
commit c53bc4dc45
2 changed files with 15 additions and 13 deletions

View File

@ -81,6 +81,7 @@ export default {
xAxis: { type: 'category' },
yAxis: [{
type: 'value',
name:'充电量/放电量kWh',
axisLine: {
lineStyle:{
color: '#333333',
@ -89,6 +90,7 @@ export default {
}
},{
type: 'value',
name:'效率%',
axisLine: {
lineStyle:{
color: '#333333',
@ -96,7 +98,7 @@ export default {
onZero:false
}
}],
grid:{top:30},
grid:{top:40},
dataset:{
source
},
@ -123,7 +125,7 @@ export default {
const startDate=formatDate(start),endDate = formatDate(end)
getElectricData({siteId:this.siteId,startDate,endDate}).then(response => {
const {totalChargedCap='',totalDisChargedCap='',efficiency='',sevenDayDisChargeStats=[]}=response?.data || {}
this.setOption(sevenDayDisChargeStats)
this.setOption(sevenDayDisChargeStats || [])
this.totalChargedCap=totalChargedCap
this.totalDisChargedCap=totalDisChargedCap
this.efficiency=efficiency