NEZ-1248 fix: 切换 Panel 后,时间组件未刷新,造成 chart 请求时间为之前时间范围

This commit is contained in:
zhangyu
2021-11-16 10:23:35 +08:00
parent e4194fcadd
commit bb04fb852c

View File

@@ -246,13 +246,14 @@ export default {
this.showPanel = val
this.showPanel.type = 'dashboard'
this.filter.panelId = this.showPanel.id
this.dateChange()
// let curTime = this.$refs.calendarPanel.getCurrentTime();
const curTime = this.searchTime
this.filter.start_time = bus.timeFormate(curTime[0], 'yyyy-MM-dd hh:mm:ss')
this.filter.end_time = bus.timeFormate(curTime[1], 'yyyy-MM-dd hh:mm:ss')
// this.$refs.chartList.initCurrentRecordNum();
// const curTime = this.searchTime
// this.filter.start_time = bus.timeFormate(curTime[0], 'yyyy-MM-dd hh:mm:ss')
// this.filter.end_time = bus.timeFormate(curTime[1], 'yyyy-MM-dd hh:mm:ss')
// // this.$refs.chartList.initCurrentRecordNum();
// this.getData(this.filter)
this.$refs.chartList.cleanData()
this.getData(this.filter)
},
del (u) {