fix:修复 url 中包含的时间 优先级 应高于 锁定的时间优先级

This commit is contained in:
zhangyu
2023-07-20 16:55:13 +08:00
parent e3e0ca8055
commit ae79dc8674
3 changed files with 56 additions and 4 deletions

View File

@@ -1171,7 +1171,8 @@ export default {
})
},
setTimePickerRange () {
if (!this.timePickerRange.nowTimeType) {
if (this.$route.query.searchTime) return
if (!this.timePickerLocked || !this.timePickerRange.nowTimeType) {
this.setDefaultTimeRange()
}
const nowTimeType = this.nowTimeType = this.timePickerRange.nowTimeType
@@ -1202,6 +1203,10 @@ export default {
mode: { target: this, propertyName: 'mode', type: 'string' }
}
this.initQueryFromPath(searchKeys)
this.$store.dispatch('dispatchTimePickerRange', {
time: this.searchTime,
nowTimeType: this.nowTimeType
})
this.showPanel.id = this.dashboardId
this.filter.dashboardId = this.dashboardId
// 设置查看模式