From 83284569aa663571275ec8189be6945c44825dad Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Thu, 23 Mar 2023 15:21:33 +0800 Subject: [PATCH] fix: bug#9308 --- src/utils/menu.ts | 11 +++--- .../Product/Detail/DeviceAccess/index.vue | 8 ++++- src/views/device/Product/Detail/index.vue | 34 +++++++++---------- src/views/device/Product/Save/index.vue | 2 +- .../Alarm/Log/{SolveLog => Record}/index.vue | 31 +++++------------ .../Alarm/Log/TabComponent/indev.vue | 12 +++---- 6 files changed, 45 insertions(+), 53 deletions(-) rename src/views/rule-engine/Alarm/Log/{SolveLog => Record}/index.vue (83%) 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 @@