Selaa lähdekoodia

依然解决现场菜单问题

wukai 5 kuukautta sitten
vanhempi
commit
8543cfdbcf
3 muutettua tiedostoa jossa 26 lisäystä ja 25 poistoa
  1. 22 21
      src/router/index.js
  2. 3 3
      src/views/system/dict/data.vue
  3. 1 1
      src/views/system/dict/index.vue

+ 22 - 21
src/router/index.js

@@ -62,10 +62,10 @@ export const constantRoutes = [
     {
         path: '',
         component: Layout,
-        redirect: '/index',
+        redirect: prefix + '/index',
         children: [
             {
-                path: '/index',
+                path: prefix + '/index',
                 component: () => import('@/views/dashboard'),
                 name: 'index',
                 meta: {title: '业务运行风险', icon: 'dashboard', affix: true}
@@ -189,11 +189,21 @@ export const constantRoutes = [
     {
         path: prefix + '/system/dict',
         component: () => import('@/views/system/dict/index')
-    }
-]
-
-// 动态路由,基于用户权限动态去加载
-export const dynamicRoutes = [
+    },
+    {
+        path: prefix + '/system/dict-data',
+        component: Layout,
+        hidden: true,
+        permissions: ['system:dict:list'],
+        children: [
+            {
+                path: 'index/:dictId(\\d+)',
+                component: () => import('@/views/system/dict/data'),
+                name: 'Data',
+                meta: {title: '字典数据', activeMenu: '/system/dict'}
+            }
+        ]
+    },
     {
         path: prefix + '/system/user-auth',
         component: Layout,
@@ -223,20 +233,6 @@ export const dynamicRoutes = [
         ]
     },
     {
-        path: prefix + '/system/dict-data',
-        component: Layout,
-        hidden: true,
-        permissions: ['system:dict:list'],
-        children: [
-            {
-                path: 'index/:dictId(\\d+)',
-                component: () => import('@/views/system/dict/data'),
-                name: 'Data',
-                meta: {title: '字典数据', activeMenu: '/system/dict'}
-            }
-        ]
-    },
-    {
         path: prefix + '/monitor/job-log',
         component: Layout,
         hidden: true,
@@ -264,6 +260,11 @@ export const dynamicRoutes = [
             }
         ]
     }
+];
+
+// 动态路由,基于用户权限动态去加载
+export const dynamicRoutes = [
+
 ]
 
 const router = createRouter({

+ 3 - 3
src/views/system/dict/data.vue

@@ -197,8 +197,8 @@ const typeOptions = ref([]);
 const route = useRoute();
 // 数据标签回显样式
 const listClassOptions = ref([
-  { value: "default", label: "默认" }, 
-  { value: "primary", label: "主要" }, 
+  { value: "default", label: "默认" },
+  { value: "primary", label: "主要" },
   { value: "success", label: "成功" },
   { value: "info", label: "信息" },
   { value: "warning", label: "警告" },
@@ -273,7 +273,7 @@ function handleQuery() {
 }
 /** 返回按钮操作 */
 function handleClose() {
-  const obj = { path: "/system/dict" };
+  const obj = { path: "/pxf-risk-monitor-web/system/dict" };
   proxy.$tab.closeOpenPage(obj);
 }
 /** 重置按钮操作 */

+ 1 - 1
src/views/system/dict/index.vue

@@ -107,7 +107,7 @@
          <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true"/>
          <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
             <template #default="scope">
-               <router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
+               <router-link :to="'/pxf-risk-monitor-web/system/dict-data/index/' + scope.row.dictId" class="link-type">
                   <span>{{ scope.row.dictType }}</span>
                </router-link>
             </template>