|
@@ -77,16 +77,12 @@ let menuList = ref<any[]>([
|
|
|
},
|
|
|
{
|
|
|
name: '粉尘监控',
|
|
|
- targatUrl: '/configurable/dustNew/dustS/home',
|
|
|
+ targatUrl: '/micro-vent-3dModal/configurable/dustNew/dustS/home',
|
|
|
},
|
|
|
{
|
|
|
name: '预警监测',
|
|
|
targatUrl: '/warnMonitor/configurable/home',
|
|
|
},
|
|
|
- {
|
|
|
- name: '灾害预警',
|
|
|
- MenuItemList: [{ name: '多灾融合预警' }, { name: '通风监测预警' }, { name: '火灾监测预警' }, { name: '粉尘监测预警' }, { name: '瓦斯监测预警' }],
|
|
|
- },
|
|
|
]); //一级菜单列表
|
|
|
let activeIndex = ref(0); //当前激活menu索引
|
|
|
const router = useRouter();
|
|
@@ -105,9 +101,10 @@ function menuItemClick(index) {
|
|
|
isShowMenuItem.value = false;
|
|
|
}
|
|
|
function updateActiveState(path: string) {
|
|
|
+ const currentPath = route.path;
|
|
|
menuList.value.forEach((menu, index) => {
|
|
|
// 处理有直接链接的菜单项
|
|
|
- if (menu.targatUrl === path) {
|
|
|
+ if (menu.targatUrl === currentPath) {
|
|
|
activeIndex.value = index;
|
|
|
isShowMenuItem.value = false;
|
|
|
return;
|