|
@@ -3,38 +3,6 @@ import { registerBeforeRouter } from './guard'
|
|
|
export const homeIndex = () => import('@/views/home/index.vue')
|
|
|
export const Layout = () => import('@/layout/index.vue')
|
|
|
|
|
|
-const system = [
|
|
|
- {
|
|
|
- path: '/system/menus',
|
|
|
- meta: { title: '菜单管理' },
|
|
|
- component: () => import('@/views/system/menus/index.vue')
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/system/role',
|
|
|
- meta: { title: '角色管理' },
|
|
|
- component: () => import('@/views/system/role/index.vue')
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/system/dict',
|
|
|
- meta: { title: '字典管理' },
|
|
|
- component: () => import('@/views/system/dict/index.vue')
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/system/dictData',
|
|
|
- meta: { title: '字典数据管理' },
|
|
|
- component: () => import('@/views/system/dictData/index.vue')
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/system/config',
|
|
|
- meta: { title: '平台设置' },
|
|
|
- component: () => import('@/views/system/config/index.vue')
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/system/module',
|
|
|
- meta: { title: '模块设置' },
|
|
|
- component: () => import('@/views/system/module/index.vue')
|
|
|
- }
|
|
|
-]
|
|
|
const router = createRouter({
|
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
|
routes: [
|
|
@@ -57,9 +25,7 @@ const router = createRouter({
|
|
|
},
|
|
|
{
|
|
|
path: '/',
|
|
|
- meta: { title: '首页' },
|
|
|
component: Layout,
|
|
|
- redirect: '/dashboard',
|
|
|
children: [
|
|
|
{
|
|
|
path: '/',
|
|
@@ -72,7 +38,42 @@ const router = createRouter({
|
|
|
},
|
|
|
component: () => import('@/views/home/index.vue')
|
|
|
},
|
|
|
- ...system
|
|
|
+ {
|
|
|
+ path: '/system',
|
|
|
+ meta: { title: '系统设置' },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: '/system/menus',
|
|
|
+ meta: { title: '菜单管理' },
|
|
|
+ component: () => import('@/views/system/menus/index.vue')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/system/role',
|
|
|
+ meta: { title: '角色管理' },
|
|
|
+ component: () => import('@/views/system/role/index.vue')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/system/dict',
|
|
|
+ meta: { title: '字典管理' },
|
|
|
+ component: () => import('@/views/system/dict/index.vue')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/system/dictData',
|
|
|
+ meta: { title: '字典数据管理' },
|
|
|
+ component: () => import('@/views/system/dictData/index.vue')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/system/config',
|
|
|
+ meta: { title: '平台设置' },
|
|
|
+ component: () => import('@/views/system/config/index.vue')
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/system/module',
|
|
|
+ meta: { title: '模块设置' },
|
|
|
+ component: () => import('@/views/system/module/index.vue')
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
]
|
|
|
}
|
|
|
]
|