一周功率曲线横坐标展示更新
This commit is contained in:
@ -80,7 +80,7 @@
|
|||||||
enableScroll: true,
|
enableScroll: true,
|
||||||
xAxis: {
|
xAxis: {
|
||||||
scrollShow: true,
|
scrollShow: true,
|
||||||
itemCount: 7,
|
itemCount: 5,
|
||||||
disableGrid: true
|
disableGrid: true
|
||||||
},
|
},
|
||||||
// update: 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() {
|
getWeekChartData() {
|
||||||
this.$refs.weekChartDateRangeSelect.showBtnLoading(true)
|
this.$refs.weekChartDateRangeSelect.showBtnLoading(true)
|
||||||
getSevenChargeData({
|
getSevenChargeData({
|
||||||
@ -234,9 +241,9 @@
|
|||||||
chargedCap = [],
|
chargedCap = [],
|
||||||
disChargedCap = []
|
disChargedCap = []
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
categories.push(item.ammeterDate || undefined)
|
categories.push(this.handleDate(item.ammeterDate) || undefined)
|
||||||
chargedCap.push(item.chargedCap || undefined)
|
chargedCap.push(item.chargedCap)
|
||||||
disChargedCap.push(item.disChargedCap || undefined)
|
disChargedCap.push(item.disChargedCap)
|
||||||
})
|
})
|
||||||
this.weekChartData = JSON.parse(JSON.stringify({
|
this.weekChartData = JSON.parse(JSON.stringify({
|
||||||
categories,
|
categories,
|
||||||
|
|||||||
Reference in New Issue
Block a user