Просмотр исходного кода

QHSE跳转添加路由,运营会议跳转

Co-authored-by: Copilot <copilot@github.com>
Zimo 1 день назад
Родитель
Сommit
d8093b39b7

+ 7 - 1
src/layout/components/Menu/src/components/useRenderMenuItem.tsx

@@ -48,9 +48,15 @@ export const useRenderMenuItem = () =>
                 '证书管理',
                 '危险源管理',
                 '环境因素识别',
-                '事故事件上报'
+                '事故事件上报',
+                '隐患排查',
+                'SOC卡分析数据源',
+                'SOC卡汇总',
+                'JSA'
               ].includes(v.meta?.title)
             )
+          } else if (currentSource === 'yyhy') {
+            return !v.meta?.hidden && ['生产运营双周会'].includes(v.meta?.title)
           } else {
             return !v.meta?.hidden
           }

+ 2 - 0
src/layout/components/TagsView/src/helper.ts

@@ -15,6 +15,8 @@ export const filterAffixTags = (routes: AppRouteRecordRaw[], parentPath = '') =>
       route.meta.affix = true
     } else if (currentSource === 'qhse' && tagPath === '/qhse/measure/ledger') {
       route.meta.affix = true
+    } else if (currentSource === 'yyhy' && tagPath === '/operation-meeting') {
+      route.meta.affix = true
     }
     if (meta?.affix) {
       tags.push({ ...route, path: tagPath, fullPath: tagPath } as RouteLocationNormalizedLoaded)

+ 12 - 0
src/permission.ts

@@ -119,6 +119,11 @@ router.beforeEach(async (to, from, next) => {
         next({ path: '/qhse/measure/ledger' })
       }
 
+      if (source && source === 'yyhy') {
+        sessionStorage.setItem('LOGIN_SOURCE', source as string)
+        next({ path: '/operation-meeting' })
+      }
+
       next({ path: '/' })
     } else {
       // 获取所有字典
@@ -182,6 +187,11 @@ router.beforeEach(async (to, from, next) => {
         next({ path: '/qhse/measure/ledger' })
       }
 
+      if (source && source === 'yyhy') {
+        sessionStorage.setItem('LOGIN_SOURCE', source as string)
+        next({ path: '/operation-meeting' })
+      }
+
       next({ path: '/index' })
     } else if (whiteList.indexOf(to.path) !== -1) {
       const code = to.query.code
@@ -208,6 +218,8 @@ router.beforeEach(async (to, from, next) => {
         next(`/login?redirect=/video_center/protocol`)
       } else if (source && source === 'qhse') {
         next(`/login?redirect=/qhse/measure/ledger`)
+      } else if (source && source === 'yyhy') {
+        next(`/login?redirect=/operation-meeting`)
       } else next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
     }
   }