NEZ-781 fix:project页面跳转问题回退的问题
This commit is contained in:
@@ -1347,7 +1347,6 @@ export default {
|
||||
},
|
||||
// 设置数据, filter区分
|
||||
setData (chartItem, seriesItem, panelId, filter, legend, area, errorMsg) {
|
||||
console.log(chartItem, seriesItem, panelId, filter, legend, area, errorMsg)
|
||||
legend && this.setColor(legend.length)
|
||||
legend && legend.forEach((t, i) => { t.color = this.bgColorList[i] })
|
||||
this.filter.from = filter.from
|
||||
|
||||
@@ -94,10 +94,6 @@ import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
||||
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
||||
|
||||
export default {
|
||||
beforeRouteLeave (to, from, next) { // 路由离开之前触发
|
||||
localStorage.removeItem('endpointProjectId')
|
||||
next()
|
||||
},
|
||||
name: 'endpointList',
|
||||
components: {
|
||||
EditEndpointBoxNew,
|
||||
@@ -356,6 +352,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
localStorage.removeItem('endpointProjectId')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -72,10 +72,6 @@ import exportXLSX from '@/components/common/exportXLSX'
|
||||
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
|
||||
|
||||
export default {
|
||||
beforeRouteLeave (to, from, next) { // 路由离开之前触发
|
||||
localStorage.removeItem('moduleProjectId')
|
||||
next()
|
||||
},
|
||||
name: 'moduleList',
|
||||
components: {
|
||||
nzDataList,
|
||||
@@ -268,6 +264,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
localStorage.removeItem('moduleProjectId')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -48,6 +48,9 @@ router.beforeEach((to, from, next) => {
|
||||
if (hasMenu(store.getters.menuList, to.path)) {
|
||||
next()
|
||||
} else {
|
||||
if (to.path === '/monitor/monitor/project' || to.path === '/monitor/monitor/module' || to.path === '/monitor/monitor/endpoint') {
|
||||
return
|
||||
}
|
||||
ElementUI.Message.error(i18n.t('tip.noAccess'))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user