fix(cmdb-ui):set localstorage '' after unsubscribe ci (#296)

This commit is contained in:
wang-liang0615
2023-12-12 09:38:50 +08:00
committed by GitHub
parent e0c8263542
commit cf0ad7bad6
3 changed files with 14 additions and 0 deletions

View File

@@ -95,6 +95,10 @@ export default {
const unsubTree = subscribeTreeView(citypeId, '')
Promise.all([unsubCIType, unsubTree]).then(() => {
that.$message.success('取消订阅成功')
const lastTypeId = window.localStorage.getItem('ops_ci_typeid') || undefined
if (Number(citypeId) === Number(lastTypeId)) {
localStorage.setItem('ops_ci_typeid', '')
}
// 删除路由
const href = window.location.href
const hrefSplit = href.split('/')