NEZ-3006 fix:Explorer保存图表 preview 时间选择器出现invalid date

This commit is contained in:
zhangyu
2023-07-21 11:59:28 +08:00
parent f85c7a61ed
commit b8746e9459
3 changed files with 18 additions and 17 deletions

View File

@@ -1154,15 +1154,14 @@ export default {
time: this.searchTime,
nowTimeType: this.nowTimeType
})
this.$store.dispatch('dispatchTimePickerRange', {
time: this.searchTime,
nowTimeType: this.nowTimeType
})
// this.$store.dispatch('dispatchTimePickerRange', {
// time: this.searchTime,
// nowTimeType: this.nowTimeType
// })
})
},
setTimePickerRange () {
this.$nextTick(() => {
console.log(13123213,this.timePickerLocked, this.timePickerRange.nowTimeType)
if (this.$route.query.searchTime) return
if (!this.timePickerLocked || !this.timePickerRange.nowTimeType) {
this.setDefaultTimeRange()
@@ -1236,12 +1235,14 @@ export default {
watch: {
showPanel: {
handler () {
if (this.timePickerLocked && this.timePickerRange && this.timePickerRange.nowTimeType) {
this.setTimePickerRange()
} else {
this.setDefaultTimeRange()
}
this.setDefaultRefresh()
this.$nextTick(() => {
if (this.timePickerLocked && this.timePickerRange && this.timePickerRange.nowTimeType) {
this.setTimePickerRange()
} else {
this.setDefaultTimeRange()
}
this.setDefaultRefresh()
})
}
},
// 监听图表联动配置