菜单更新,单站监控展示

This commit is contained in:
白菜
2025-11-05 14:50:11 +08:00
parent c403922639
commit 371a2d8be0
2 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,6 @@ const ems = {
console.log('store action getZdList 获取站点数据',state.zdList)
})
}
},
//查询站点的所有待处理0的告警 存在展示红点标志
getSiteAlarmNum({state,commit},siteId){

View File

@ -33,12 +33,13 @@ const permission = {
GenerateRoutes({ commit }) {
return new Promise(resolve => {
// 向后端请求路由数据
getRouters().then(res => {
let hasDzjk = false
getRouters().then(res => {
let sysDzjk = -1
if(res?.data){
res.data.forEach(i=>{
i.children && i.children.find(j=>j.path.indexOf('dzjk')>-1) && (hasDzjk=true)
sysDzjk = res.data.findIndex(i=>{
return i.children && i.children.find(j=>j.path.indexOf('dzjk')>-1)
})
if(sysDzjk>-1) res.data.splice(sysDzjk,1)
}
const sdata = JSON.parse(JSON.stringify(res.data))
const rdata = JSON.parse(JSON.stringify(res.data))
@ -47,7 +48,7 @@ const permission = {
const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
router.addRoutes(asyncRoutes)
if(!hasDzjk){
if(sysDzjk === -1){
const index = constantRoutes.findIndex(i=>i.path.indexOf('dzjk')>-1)
constantRoutes.splice(index,1)
}