一周功率曲线横坐标展示更新

This commit is contained in:
白菜
2025-09-04 16:10:44 +08:00
parent 74b22a2ec6
commit fb8c8aab28

View File

@ -80,7 +80,7 @@
enableScroll: true,
xAxis: {
scrollShow: true,
itemCount: 7,
itemCount: 5,
disableGrid: true
},
// update: true,
@ -221,6 +221,13 @@
}
})
},
handleDate(date) {
if (!date) return date
const time = new Date(date)
const month = time.getMonth() + 1,
day = time.getDate()
return `${month<10?'0'+month : month}/${day<10 ? '0'+day : day}`
},
getWeekChartData() {
this.$refs.weekChartDateRangeSelect.showBtnLoading(true)
getSevenChargeData({
@ -234,9 +241,9 @@
chargedCap = [],
disChargedCap = []
data.forEach(item => {
categories.push(item.ammeterDate || undefined)
chargedCap.push(item.chargedCap || undefined)
disChargedCap.push(item.disChargedCap || undefined)
categories.push(this.handleDate(item.ammeterDate) || undefined)
chargedCap.push(item.chargedCap)
disChargedCap.push(item.disChargedCap)
})
this.weekChartData = JSON.parse(JSON.stringify({
categories,