fix: timeRange添加注释

This commit is contained in:
刘洪洪
2022-10-27 16:32:16 +08:00
parent e7cf758ffd
commit e019f8a02e
2 changed files with 4 additions and 2 deletions

View File

@@ -168,9 +168,11 @@ export default {
const panel = ref({})
let panelType = 1 // 取得panel的type
const { params, query, path } = useRoute()
// 下钻和返回都是在同一路由下进行根据store存储的timeRange可避免下钻后返回被重置的情况
// 切换其他界面时重置timeRange避免影响其他界面使用timeRange
if (path === store.getters.getRouterPath) {
if (query.startTime === undefined && store.getters.getTimeRangeFlag !== null) {
// 为了避免下钻后将timeRange由范围改为为小时制
// 为了避免下钻后返回timeRange被重置以及timeRange被修改返回时url没有更新
const newUrl = urlParamsHandler(window.location.href, query, {
startTime: store.getters.getTimeRangeArray[0],
endTime: store.getters.getTimeRangeArray[1],