Kaynağa Gözat

管理后台-路由配置

panyong 3 yıl önce
ebeveyn
işleme
d720d66dbc
1 değiştirilmiş dosya ile 31 ekleme ve 45 silme
  1. 31 45
      htmldev/manage/src/router/index.js

+ 31 - 45
htmldev/manage/src/router/index.js

@@ -57,52 +57,38 @@ export const asyncRoutes = [
     }]
   },
   {
-    path: '/project',
+    path: '/sys',
     component: Layout,
-    redirect: '/project/list',
-    meta: { title: '项目管理', icon: 'table', roleValue: 'project_list_show' },
-    children: [{
-      path: 'list',
-      name: 'project',
-      component: () => import('@/views/project/index'),
-      meta: { title: '项目列表', roleValue: 'project_list_show' }
-    }]
-  },
-  {
-    path: '/department',
-    component: Layout,
-    redirect: '/department/list',
-    meta: { title: '部门管理', icon: 'el-icon-s-check', roleValue: 'department_list_show' },
-    children: [{
-      path: 'list',
-      name: 'department',
-      component: () => import('@/views/department/index'),
-      meta: { title: '部门列表', roleValue: 'department_list_show' }
-    }]
-  },
-  {
-    path: '/roles',
-    component: Layout,
-    redirect: '/roles/list',
-    meta: { title: '角色管理', icon: 'peoples', roleValue: 'roles_list_show' },
-    children: [{
-      path: 'list',
-      name: 'roles',
-      component: () => import('@/views/roles/index'),
-      meta: { title: '角色列表', roleValue: 'roles_list_show' }
-    }]
-  },
-  {
-    path: '/user',
-    component: Layout,
-    redirect: '/user/list',
-    meta: { title: '用户管理', icon: 'user', roleValue: 'user_list_show' },
-    children: [{
-      path: 'list',
-      name: 'user',
-      component: () => import('@/views/user/index'),
-      meta: { title: '用户列表', roleValue: 'user_list_show' }
-    }]
+    redirect: 'noRedirect',
+    alwaysShow: true,
+    name: 'sys',
+    meta: { title: '系统设置', icon: 'lock', roleValue: 'sys_set' },
+    children: [
+      {
+        path: 'project/list',
+        name: 'project',
+        component: () => import('@/views/project/index'),
+        meta: { title: '项目列表', roleValue: 'project_list_show' }
+      },
+      {
+        path: 'department/list',
+        name: 'department',
+        component: () => import('@/views/department/index'),
+        meta: { title: '部门列表', roleValue: 'department_list_show' }
+      },
+      {
+        path: 'roles/list',
+        name: 'roles',
+        component: () => import('@/views/roles/index'),
+        meta: { title: '角色列表', roleValue: 'roles_list_show' }
+      },
+      {
+        path: 'user/list',
+        name: 'user',
+        component: () => import('@/views/user/index'),
+        meta: { title: '用户列表', roleValue: 'user_list_show' }
+      }
+    ]
   },
   {
     path: '/icon',