diff --git a/src/utils/menu.ts b/src/utils/menu.ts index 74fb9892..2a08cba4 100644 --- a/src/utils/menu.ts +++ b/src/utils/menu.ts @@ -148,6 +148,9 @@ const extraRouteObj = { 'edge/Device': { children: [{ code: 'Remote', name: '远程控制' }], }, + 'rule-engine/Alarm/Log': { + children: [{ code: 'Record', name: '处理记录' }] + } }; @@ -206,7 +209,7 @@ const findDetailRoutes = (routes: any[]): any[] => { export const findCodeRoute = (asyncRouterMap: any[]) => { const routeMeta = {} - function getDetail( code: string, url: string) { + function getDetail(code: string, url: string) { const detail = findDetailRouteItem(code, url) if (!detail) return routeMeta[(detail as MenuItem).code] = { @@ -217,7 +220,7 @@ export const findCodeRoute = (asyncRouterMap: any[]) => { } } - function findChildren (data: any[], code: string = '') { + function findChildren(data: any[], code: string = '') { data.forEach(route => { routeMeta[route.code] = { path: route.url || route.path, @@ -254,7 +257,7 @@ export const findCodeRoute = (asyncRouterMap: any[]) => { return routeMeta } -export function filterAsyncRouter(asyncRouterMap: any, parentCode = '', level = 1): { menusData: any, silderMenus: any} { +export function filterAsyncRouter(asyncRouterMap: any, parentCode = '', level = 1): { menusData: any, silderMenus: any } { const _asyncRouterMap = cloneDeep(asyncRouterMap) const menusData: any[] = [] const silderMenus: any[] = [] @@ -270,7 +273,7 @@ export function filterAsyncRouter(asyncRouterMap: any, parentCode = '', level = }, } - const silder = {..._route} + const silder = { ..._route } // 查看是否有隐藏子路由 route.children = findChildrenRoute(route.code, route.url, route.children) diff --git a/src/views/device/Product/Detail/DeviceAccess/index.vue b/src/views/device/Product/Detail/DeviceAccess/index.vue index 42f4bb65..fa7b465c 100644 --- a/src/views/device/Product/Detail/DeviceAccess/index.vue +++ b/src/views/device/Product/Detail/DeviceAccess/index.vue @@ -33,7 +33,7 @@ " >
- {{ productStore.current?.count ? productStore.current?.count @@ -62,18 +71,6 @@