Commit b798852a authored by 高宇's avatar 高宇

关闭标签页清除

parent ef5ddcd0
......@@ -150,13 +150,15 @@ export default {
})
},
closeSelectedTag(view) {
// 关闭标签页清除存储的筛选条件数据
this.$store.dispatch('searchSave/clearOneParams',this.$route.path)
this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
if (this.isActive(view)) {
this.toLastView(visitedViews, view)
}
if (view.path === '/processManagement/deviceReuse') {
if (sessionStorage.getItem('recycleform') !== null) { sessionStorage.removeItem('recycleform') }
}
// if (view.path === '/processManagement/deviceReuse') {
// if (sessionStorage.getItem('recycleform') !== null) { sessionStorage.removeItem('recycleform') }
// }
})
},
closeOthersTags() {
......
......@@ -18,7 +18,8 @@ const mutations = {
state.searchParams = {}
},
CLEAR_ONE_PARAMS: (state, path) => {
path && state.searchParams[path] && delete state.searchParams[path]
// path && state.searchParams[path] && delete state.searchParams[path]
state.searchParams[path] = ''
}
}
......@@ -32,7 +33,10 @@ const actions = {
commit('RSET_SEARCH_PARAMS')
},
clearOneParams({ commit }, path) {
commit('CLEAR_ONE_PARAMS', path)
// 延时清除缓存数据,防止路由离开前重新赋值
setTimeout(() => {
commit('CLEAR_ONE_PARAMS', path)
}, 2000)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment