config.js 5.56 KB
Newer Older
wb-ct393452's avatar
wb-ct393452 committed
1 2 3 4
import { BlankTemplateView, PageTemplateView, TabsTemplateView } from '@/pages/frame/view/template';

// 路由配置
const options = {
水落(YangLei)'s avatar
水落(YangLei) committed
5
    mode: 'history',
wb-ct393452's avatar
wb-ct393452 committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
    routes: [
        {
            path: '/login',
            name: '登录页',
            component: () => import('@/pages/frame/view/login'),
        },
        {
            path: '*',
            name: '404',
            component: () => import('@/pages/frame/view/exception/404'),
        },
        {
            path: '/403',
            name: '403',
            component: () => import('@/pages/frame/view/exception/403'),
        },
        {
            path: '/500',
            name: '500',
            component: () => import('@/pages/frame/view/exception/500'),
        },
        {
            path: '/',
            component: TabsTemplateView,
水落(YangLei)'s avatar
水落(YangLei) committed
30 31
            redirect: '/home',
            name: '首页',
wb-ct393452's avatar
wb-ct393452 committed
32
            children: [
水落(YangLei)'s avatar
水落(YangLei) committed
33 34
                {
                    path: 'home',
35
                    name: '首页',
水落(YangLei)'s avatar
水落(YangLei) committed
36 37 38
                    meta: { icon: 'home' },
                    component: () => import('@/pages/home/index.vue'),
                },
wb-ct393452's avatar
wb-ct393452 committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
                {
                    path: 'dashboard',
                    name: 'Dashboard',
                    meta: {
                        icon: 'dashboard',
                    },
                    component: BlankTemplateView,
                    children: [
                        {
                            path: 'workbench',
                            name: '工作台',
                            meta: {
                                page: {
                                    closable: false,
                                },
                            },
                            component: () => import('@/pages/dashboard/workbench'),
                        },
                        {
                            path: 'analysis',
                            name: '分析页',
                            component: () => import('@/pages/dashboard/analysis'),
                        },
                    ],
                },
                {
                    path: 'system_management',
                    name: '系统管理',
                    meta: {
                        icon: 'setting',
                        page: {
                            cacheAble: true,
                        },
                    },
                    component: PageTemplateView,
                    children: [
                        {
                            path: 'menu_management',
                            name: '菜单管理',
                            component: () => import('@/pages/system/view/menu'),
                        },
                        {
                            path: 'organization_management',
                            name: '组织管理',
陈浩玮's avatar
陈浩玮 committed
83 84 85 86 87
                            component: BlankTemplateView,
                            children: [
                                {
                                    path: 'job_management',
                                    name: '岗位管理',
陈浩玮's avatar
陈浩玮 committed
88
                                    component: () =>
陈浩玮's avatar
陈浩玮 committed
89
                                        import('@/pages/system/view/organization/jobsmanagement/Jobs.vue'),
陈浩玮's avatar
陈浩玮 committed
90 91 92 93 94
                                },
                                {
                                    path: 'user_management',
                                    name: '用户管理',
                                    component: () =>
陈浩玮's avatar
陈浩玮 committed
95 96 97 98 99 100 101
                                        import('@/pages/system/view/organization/usermanagement/User.vue'),
                                },
                                {
                                    path: 'org_management',
                                    name: '机构管理',
                                    component: () =>
                                        import('@/pages/system/view/organization/orgmanagement/Org.vue'),
陈浩玮's avatar
陈浩玮 committed
102 103
                                },
                            ],
wb-ct393452's avatar
wb-ct393452 committed
104 105 106 107 108 109 110 111 112 113 114 115 116 117
                        },
                        {
                            path: 'role_management',
                            name: '角色管理',
                            component: () => import('@/pages/system/view/role'),
                        },
                        {
                            path: 'parameter_management',
                            name: '参数管理',
                            component: () => import('@/pages/system/view/parameter'),
                        },
                        {
                            path: 'log_management',
                            name: '日志管理',
118 119 120 121 122 123 124 125
                            component: BlankTemplateView,
                            children: [
                                {
                                    path: 'login_log',
                                    name: '登录日志',
                                    component: () => import('@/pages/system/view/log/login_log/index.vue'),
                                },
                            ],
wb-ct393452's avatar
wb-ct393452 committed
126
                        },
水落(YangLei)'s avatar
水落(YangLei) committed
127 128 129 130 131
                        {
                            path: 'task_management',
                            name: '任务管理',
                            component: () => import('@/pages/system/view/task/index.vue'),
                        },
wb-ct393452's avatar
wb-ct393452 committed
132 133
                    ],
                },
水落(YangLei)'s avatar
水落(YangLei) committed
134 135 136 137 138 139
                {
                    path: 'user_center',
                    name: '个人中心',
                    meta: { icon: 'user' },
                    component: () => import('@/pages/user/index.vue'),
                },
wb-ct393452's avatar
wb-ct393452 committed
140 141 142 143 144 145
            ],
        },
    ],
};

export default options;