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

// 路由配置
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
    routes: [
        {
            path: '/login',
            name: '登录页',
            component: () => import('@/pages/frame/view/login'),
        },
        {
            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
25 26
            redirect: '/home',
            name: '首页',
wb-ct393452's avatar
wb-ct393452 committed
27
            children: [
水落(YangLei)'s avatar
水落(YangLei) committed
28 29
                {
                    path: 'home',
30
                    name: '首页',
水落(YangLei)'s avatar
水落(YangLei) committed
31 32 33
                    meta: { icon: 'home' },
                    component: () => import('@/pages/home/index.vue'),
                },
wb-ct393452's avatar
wb-ct393452 committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
                {
                    path: 'dashboard',
                    name: 'Dashboard',
                    meta: {
                        icon: 'dashboard',
                    },
                    children: [
                        {
                            path: 'workbench',
                            name: '工作台',
                            meta: {
                                page: {
                                    closable: false,
                                },
                            },
                            component: () => import('@/pages/dashboard/workbench'),
                        },
                        {
                            path: 'analysis',
                            name: '分析页',
                            component: () => import('@/pages/dashboard/analysis'),
                        },
                    ],
                },
                {
59
                    path: 'system',
wb-ct393452's avatar
wb-ct393452 committed
60 61 62 63 64 65 66 67 68 69
                    name: '系统管理',
                    meta: {
                        icon: 'setting',
                        page: {
                            cacheAble: true,
                        },
                    },
                    component: PageTemplateView,
                    children: [
                        {
70
                            path: 'menu',
wb-ct393452's avatar
wb-ct393452 committed
71 72 73 74
                            name: '菜单管理',
                            component: () => import('@/pages/system/view/menu'),
                        },
                        {
75
                            path: 'organization',
wb-ct393452's avatar
wb-ct393452 committed
76
                            name: '组织管理',
陈浩玮's avatar
陈浩玮 committed
77 78
                            children: [
                                {
79
                                    path: 'job',
陈浩玮's avatar
陈浩玮 committed
80
                                    name: '岗位管理',
陈浩玮's avatar
陈浩玮 committed
81
                                    component: () =>
陈浩玮's avatar
陈浩玮 committed
82
                                        import('@/pages/system/view/organization/jobsmanagement/Jobs.vue'),
陈浩玮's avatar
陈浩玮 committed
83 84
                                },
                                {
85
                                    path: 'user',
陈浩玮's avatar
陈浩玮 committed
86 87
                                    name: '用户管理',
                                    component: () =>
陈浩玮's avatar
陈浩玮 committed
88 89 90
                                        import('@/pages/system/view/organization/usermanagement/User.vue'),
                                },
                                {
91
                                    path: 'org',
陈浩玮's avatar
陈浩玮 committed
92 93 94
                                    name: '机构管理',
                                    component: () =>
                                        import('@/pages/system/view/organization/orgmanagement/Org.vue'),
陈浩玮's avatar
陈浩玮 committed
95 96
                                },
                            ],
wb-ct393452's avatar
wb-ct393452 committed
97 98
                        },
                        {
99
                            path: 'role',
wb-ct393452's avatar
wb-ct393452 committed
100 101 102 103
                            name: '角色管理',
                            component: () => import('@/pages/system/view/role'),
                        },
                        {
104
                            path: 'parameter',
wb-ct393452's avatar
wb-ct393452 committed
105
                            name: '参数管理',
陈浩玮's avatar
参数  
陈浩玮 committed
106 107
                            children: [
                                {
108
                                    path: 'business',
陈浩玮's avatar
参数  
陈浩玮 committed
109 110 111 112
                                    name: '业务参数',
                                    component: () =>
                                        import('@/pages/system/view/parameter/business/index.vue'),
                                },
陈浩玮's avatar
陈浩玮 committed
113
                                {
114
                                    path: 'operation',
陈浩玮's avatar
陈浩玮 committed
115 116 117 118
                                    name: '运维参数',
                                    component: () =>
                                        import('@/pages/system/view/parameter/operation/index.vue'),
                                },
陈浩玮's avatar
参数  
陈浩玮 committed
119
                            ],
wb-ct393452's avatar
wb-ct393452 committed
120 121
                        },
                        {
122
                            path: 'log',
wb-ct393452's avatar
wb-ct393452 committed
123
                            name: '日志管理',
124 125
                            children: [
                                {
126
                                    path: 'login',
127
                                    name: '登录日志',
128
                                    component: () => import('@/pages/system/view/log/login_log'),
129
                                },
130
                                {
131
                                    path: 'operation',
132 133 134
                                    name: '操作日志',
                                    component: () => import('@/pages/system/view/log/operation/index.vue'),
                                },
135
                            ],
wb-ct393452's avatar
wb-ct393452 committed
136
                        },
水落(YangLei)'s avatar
水落(YangLei) committed
137
                        {
138
                            path: 'task',
水落(YangLei)'s avatar
水落(YangLei) committed
139 140 141
                            name: '任务管理',
                            component: () => import('@/pages/system/view/task/index.vue'),
                        },
wb-ct393452's avatar
wb-ct393452 committed
142 143
                    ],
                },
水落(YangLei)'s avatar
水落(YangLei) committed
144
                {
145
                    path: 'user',
水落(YangLei)'s avatar
水落(YangLei) committed
146 147 148 149
                    name: '个人中心',
                    meta: { icon: 'user' },
                    component: () => import('@/pages/user/index.vue'),
                },
wb-ct393452's avatar
wb-ct393452 committed
150 151
            ],
        },
水落(YangLei)'s avatar
水落(YangLei) committed
152 153 154 155 156
        {
            path: '*',
            name: '404',
            component: () => import('@/pages/frame/view/exception/404'),
        },
wb-ct393452's avatar
wb-ct393452 committed
157 158 159 160
    ],
};

export default options;