Jelajahi Sumber

还是解决权限问题

wukai 7 bulan lalu
induk
melakukan
53afd2942b

+ 102 - 8
src/router/index.js

@@ -24,6 +24,8 @@ import Layout from '@/layout'
   }
  */
 
+const prefix = '/pxf-risk-monitor-web'
+
 // 公共路由
 export const constantRoutes = [
     {
@@ -53,7 +55,7 @@ export const constantRoutes = [
         hidden: true
     },
     {
-        path: '/401',
+        path: prefix + '/401',
         component: () => import('@/views/error/401'),
         hidden: true
     },
@@ -83,7 +85,7 @@ export const constantRoutes = [
         ]
     },
     {
-        path: '/user',
+        path: prefix + '/user',
         component: Layout,
         hidden: true,
         redirect: 'noredirect',
@@ -95,13 +97,105 @@ export const constantRoutes = [
                 meta: {title: '个人中心', icon: 'user'}
             }
         ]
+    },
+    {
+        path: prefix + '/link/pp-link',
+        component: () => import('@/views/obj/pp/link')
+    },
+    {
+        path: prefix + '/hl/bm',
+        component: () => import('@/views/hl/bm/index')
+    },
+    {
+        path: prefix + '/hl/check',
+        component: () => import('@/views/hl/check/index')
+    },
+    {
+        path: prefix + '/alarm/record',
+        component: () => import('@/views/alarm/record/index')
+    },
+    {
+        path: prefix + '/alarm/bizType',
+        component: () => import('@/views/alarm/record/bizType')
+    },
+    {
+        path: prefix + '/alarm/bizSort',
+        component: () => import('@/views/alarm/record/bizSort')
+    },
+    {
+        path: prefix + '/alarm/bizAccess',
+        component: () => import('@/views/alarm/record/bizAccess')
+    },
+    {
+        path: prefix + '/risk/heterogeneous',
+        component: () => import('@/views/risk/r2/index')
+    },
+    {
+        path: prefix + '/risk/frequency',
+        component: () => import('@/views/risk/r3/index')
+    },
+    {
+        path: prefix + '/risk/numerical',
+        component: () => import('@/views/risk/r4/index')
+    },
+    {
+        path: prefix + '/risk/bizHost',
+        component: () => import('@/views/risk/r5/index')
+    },
+    {
+        path: prefix + '/risk/bizNetwork',
+        component: () => import('@/views/risk/r6/index')
+    },
+    {
+        path: prefix + '/risk/bizServer',
+        component: () => import('@/views/risk/r7/index')
+    },
+    {
+        path: prefix + '/ms/type',
+        component: () => import('@/views/ms/type/index')
+    },
+    {
+        path: prefix + '/ms/def',
+        component: () => import('@/views/ms/def/index')
+    },
+    {
+        path: prefix + '/ms/mstpl',
+        component: () => import('@/views/ms/mstpl/index')
+    },
+    {
+        path: prefix + '/obj/obj',
+        component: () => import('@/views/obj/obj/index')
+    },
+    {
+        path: prefix + '/sendMsg/pushConfig',
+        component: () => import('@/views/push/pushConfig/index')
+    },
+    {
+        path: prefix + '/sendMsg/pushRecordSms',
+        component: () => import('@/views/push/pushRecord/sms')
+    },
+    {
+        path: prefix + '/sendMsg/pushRecordMail',
+        component: () => import('@/views/push/pushRecord/mail')
+    },
+    {
+        path: prefix + '/monitor/job',
+        component: () => import('@/views/monitor/job/index')
+    },
+    {
+        path: prefix + '/system/config',
+        component: () => import('@/views/system/config/index')
+    },
+    {
+        path: prefix + '/system/dict',
+        component: () => import('@/views/system/dict/index')
     }
 ]
 
 // 动态路由,基于用户权限动态去加载
 export const dynamicRoutes = [
     {
-        path: '/pxf-risk-monitor-web/system/user-auth',
+        path: prefix + '/system/user-auth',
         component: Layout,
         hidden: true,
         permissions: ['system:user:edit'],
@@ -115,7 +209,7 @@ export const dynamicRoutes = [
         ]
     },
     {
-        path: '/pxf-risk-monitor-web/system/role-auth',
+        path: prefix + '/system/role-auth',
         component: Layout,
         hidden: true,
         permissions: ['system:role:edit'],
@@ -129,7 +223,7 @@ export const dynamicRoutes = [
         ]
     },
     {
-        path: '/pxf-risk-monitor-web/system/dict-data',
+        path: prefix + '/system/dict-data',
         component: Layout,
         hidden: true,
         permissions: ['system:dict:list'],
@@ -143,7 +237,7 @@ export const dynamicRoutes = [
         ]
     },
     {
-        path: '/pxf-risk-monitor-web/monitor/job-log',
+        path: prefix + '/monitor/job-log',
         component: Layout,
         hidden: true,
         permissions: ['monitor:job:list'],
@@ -157,7 +251,7 @@ export const dynamicRoutes = [
         ]
     },
     {
-        path: '/pxf-risk-monitor-web/tool/gen-edit',
+        path: prefix + '/tool/gen-edit',
         component: Layout,
         hidden: true,
         permissions: ['tool:gen:edit'],
@@ -173,7 +267,7 @@ export const dynamicRoutes = [
 ]
 
 const router = createRouter({
-    history: createWebHashHistory('/pxf-risk-monitor-web/'),
+    history: createWebHashHistory(prefix + '/'),
     routes: constantRoutes,
     scrollBehavior(to, from, savedPosition) {
         if (savedPosition) {

+ 2 - 2
src/store/modules/permission.js

@@ -42,8 +42,8 @@ const usePermissionStore = defineStore(
             const sidebarRoutes = filterAsyncRouter(sdata)
             const rewriteRoutes = filterAsyncRouter(rdata, false, true)
             const defaultRoutes = filterAsyncRouter(defaultData)
-            const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
-            asyncRoutes.forEach(route => { router.addRoute(route) })
+            // const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
+            // asyncRoutes.forEach(route => { router.addRoute(route) })
             this.setRoutes(rewriteRoutes)
             this.setSidebarRouters(constantRoutes.concat(sidebarRoutes))
             this.setDefaultRoutes(sidebarRoutes)

+ 6 - 5
src/views/alarm/record/bizAccess.vue

@@ -37,11 +37,12 @@
             </template>
           </el-table-column>
           <el-table-column label="组件名称" align="left" prop="modelName" width="150"/>
-          <el-table-column label="应用编码" align="left" prop="code" width="150">
-            <template #default="scope">
-              <el-button link type="primary" @click="jumpPP(scope.row)">{{ scope.row.code }}</el-button>
-            </template>
-          </el-table-column>
+          <el-table-column label="应用编码" align="left" prop="code" width="150"/>
+<!--              {{ scope.row.code }}-->
+<!--            <template #default="scope">-->
+<!--              <el-button link type="primary" @click="jumpPP(scope.row)">{{ scope.row.code }}</el-button>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
           <el-table-column label="系统压力值TPS/QPS" align="center" prop="access" width="150"/>
           <el-table-column label="访问错误次数" align="center" prop="num" width="120"/>
         </el-table>

+ 1 - 1
src/views/index/widget/topScrollBar.vue

@@ -8,7 +8,7 @@
       <span class="right-btn" @click="nowCheck(true)">立即巡检</span>
     </div>
     <div class="column-content scroll-text">
-      巡检结果:本次自动巡检共{{ result.model }}个模块,共发现{{ result.problem }}问题
+      巡检结果:{{result.result}}
     </div>
   </div>
 </template>

+ 1 - 1
src/views/obj/pp/link.vue

@@ -27,7 +27,7 @@ function init() {
     } else {
       src.value = response.msg
     }
-    console.error(query)
+    console.log(src)
   })
 }