bcm总览接口参数更新,电量指标没有返回数据时图表显示问题
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user