NEZ-2097 fix:点击筛选菜单页面自动回跳
This commit is contained in:
@@ -1224,6 +1224,9 @@ export default {
|
||||
this.graphShow = show
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearTimeout(this.timer)
|
||||
},
|
||||
destroyed () {
|
||||
localStorage.removeItem('alertMessageProjectId')
|
||||
}
|
||||
|
||||
@@ -910,6 +910,9 @@ export default {
|
||||
this.getSnmpCredentialData()
|
||||
this.getFieldGroupData()
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearTimeout(this.timer)
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
immediate: true,
|
||||
|
||||
@@ -930,6 +930,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
clearTimeout(this.timer)
|
||||
},
|
||||
destroyed () {
|
||||
localStorage.removeItem('endpointProjectId')
|
||||
}
|
||||
|
||||
@@ -114,7 +114,9 @@ export function get (url, params, responseType) {
|
||||
if (err.response) {
|
||||
resolve(err.response.data)
|
||||
} else if (err.message) {
|
||||
if (err.message !== 'cancel') { // 判断是否是路由跳转取消的请求(是的话没必要提示message)
|
||||
resolve(err.message)
|
||||
}
|
||||
} else {
|
||||
resolve(err)
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ router.beforeEach((to, from, next) => {
|
||||
return
|
||||
}
|
||||
if (store.getters.getNowPath !== to.path && store.getters.getNowPath !== '/login') {
|
||||
requestsArr.forEach(xhr => xhr.cancel())
|
||||
requestsArr.forEach(xhr => xhr.cancel('cancel'))
|
||||
}
|
||||
store.commit('setNowPath', to.path)
|
||||
const configUrl = 'static/config.json?Timestamp=' + new Date().getTime()
|
||||
|
||||
Reference in New Issue
Block a user