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

水落(YangLei)'s avatar
水落(YangLei) committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
export const globalRoutes = [
    {
        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'),
    },
];

const hasAuthorityRoutes = [
    {
        path: '/',
        component: TabsTemplateView,
        redirect: '/home',
        children: [
            {
                path: 'home',
                name: '首页',
                meta: { icon: 'home' },
                component: () => import('@/pages/home/index.vue'),
            },
            {
                path: 'dashboard',
                name: 'Dashboard',
                meta: {
                    icon: 'dashboard',
水落(YangLei)'s avatar
水落(YangLei) committed
39
                },
水落(YangLei)'s avatar
水落(YangLei) committed
40 41 42 43 44 45 46
                children: [
                    {
                        path: 'workbench',
                        name: '工作台',
                        meta: {
                            page: {
                                closable: false,
wb-ct393452's avatar
wb-ct393452 committed
47 48
                            },
                        },
水落(YangLei)'s avatar
水落(YangLei) committed
49 50 51 52 53 54 55 56 57
                        component: () => import('@/pages/dashboard/workbench'),
                    },
                    {
                        path: 'analysis',
                        name: '分析页',
                        component: () => import('@/pages/dashboard/analysis'),
                    },
                ],
            },
水落(YangLei)'s avatar
水落(YangLei) committed
58 59 60 61 62
            {
                path: 'ranger',
                name: '巡检管理',
                component: PageTemplateView,
                children: [
63 64 65 66 67 68 69 70
                    {
                        path: 'basic',
                        name: '基础数据配置',
                        component: RouterView,
                        children: [
                            {
                                path: 'region',
                                name: '地区配置',
陈浩玮's avatar
陈浩玮 committed
71
                                component: () => import('@/pages/ranger/basic/region'),
72
                            },
陈浩玮's avatar
修改  
陈浩玮 committed
73 74
                            {
                                path: 'place',
水落(YangLei)'s avatar
水落(YangLei) committed
75
                                name: '地点配置',
陈浩玮's avatar
修改  
陈浩玮 committed
76 77
                                component: () => import('@/pages/ranger/basic/place'),
                            },
水落(YangLei)'s avatar
水落(YangLei) committed
78 79 80 81 82
                            {
                                path: 'unit',
                                name: '单元配置',
                                component: () => import('@/pages/ranger/basic/unit'),
                            },
陈浩玮's avatar
陈浩玮 committed
83
                            {
84 85 86 87
                                path: 'major',
                                name: '专业配置',
                                component: () => import('@/pages/ranger/basic/major'),
                            },
水落(YangLei)'s avatar
水落(YangLei) committed
88
                            {
陈浩玮's avatar
陈浩玮 committed
89 90 91
                                path: 'item',
                                name: '项目配置',
                                component: () => import('@/pages/ranger/basic/item'),
陈浩玮's avatar
调整  
陈浩玮 committed
92 93 94 95 96 97 98
                            },
                            {
                                path: 'line',
                                name: '线路配置',
                                component: () => import('@/pages/ranger/basic/line'),
                            },
                            {
水落(YangLei)'s avatar
水落(YangLei) committed
99 100 101
                                path: 'exemption',
                                name: '免检配置',
                                component: () => import('@/pages/ranger/basic/exemption'),
陈浩玮's avatar
陈浩玮 committed
102
                            },
103 104
                        ],
                    },
水落(YangLei)'s avatar
水落(YangLei) committed
105 106 107 108 109 110 111 112
                    {
                        path: 'task',
                        name: '任务管理',
                        component: RouterView,
                        children: [
                            {
                                path: 'center',
                                name: '任务中心',
陈浩玮's avatar
陈浩玮 committed
113
                                component: () => import('@/pages/ranger/task_managment/center'),
114 115 116 117 118 119 120 121 122
                            },
                        ],
                    },
                    {
                        path: 'report',
                        name: '报表中心',
                        component: RouterView,
                        children: [
                            {
水落(YangLei)'s avatar
水落(YangLei) committed
123 124 125 126 127
                                path: 'trend-analysis',
                                name: '趋势对比',
                                component: () => import('@/pages/ranger/report/trend/index.vue'),
                            },
                            {
128 129
                                path: 'week',
                                name: '巡检周报',
陈浩玮's avatar
陈浩玮 committed
130
                                component: () => import('@/pages/ranger/report/weekly'),
水落(YangLei)'s avatar
水落(YangLei) committed
131
                            },
132 133 134
                            {
                                path: 'month',
                                name: '巡检月报',
陈浩玮's avatar
陈浩玮 committed
135
                                component: () => import('@/pages/ranger/report/month'),
136
                            },
水落(YangLei)'s avatar
水落(YangLei) committed
137 138 139 140
                        ],
                    },
                ],
            },
水落(YangLei)'s avatar
水落(YangLei) committed
141 142 143 144 145 146 147 148
            {
                path: 'system',
                name: '系统管理',
                component: PageTemplateView,
                children: [
                    {
                        path: 'menu',
                        name: '菜单管理',
水落(YangLei)'s avatar
水落(YangLei) committed
149
                        component: () => import('@/pages/system/menu'),
水落(YangLei)'s avatar
水落(YangLei) committed
150 151 152 153
                    },
                    {
                        path: 'organization',
                        name: '组织管理',
154
                        component: RouterView,
水落(YangLei)'s avatar
水落(YangLei) committed
155 156 157 158 159
                        children: [
                            {
                                path: 'job',
                                name: '岗位管理',
                                component: () =>
水落(YangLei)'s avatar
水落(YangLei) committed
160
                                    import('@/pages/system/organization/jobsmanagement/Jobs.vue'),
水落(YangLei)'s avatar
水落(YangLei) committed
161 162 163 164 165
                            },
                            {
                                path: 'user',
                                name: '用户管理',
                                component: () =>
水落(YangLei)'s avatar
水落(YangLei) committed
166
                                    import('@/pages/system/organization/usermanagement/User.vue'),
水落(YangLei)'s avatar
水落(YangLei) committed
167 168 169 170
                            },
                            {
                                path: 'org',
                                name: '机构管理',
水落(YangLei)'s avatar
水落(YangLei) committed
171
                                component: () => import('@/pages/system/organization/orgmanagement/Org.vue'),
水落(YangLei)'s avatar
水落(YangLei) committed
172 173 174 175 176 177
                            },
                        ],
                    },
                    {
                        path: 'role',
                        name: '角色管理',
水落(YangLei)'s avatar
水落(YangLei) committed
178
                        component: () => import('@/pages/system/role'),
水落(YangLei)'s avatar
水落(YangLei) committed
179 180 181 182
                    },
                    {
                        path: 'parameter',
                        name: '参数管理',
183
                        component: RouterView,
水落(YangLei)'s avatar
水落(YangLei) committed
184 185 186 187
                        children: [
                            {
                                path: 'business',
                                name: '业务参数',
水落(YangLei)'s avatar
水落(YangLei) committed
188
                                component: () => import('@/pages/system/parameter/business/index.vue'),
水落(YangLei)'s avatar
水落(YangLei) committed
189 190 191 192
                            },
                            {
                                path: 'operation',
                                name: '运维参数',
水落(YangLei)'s avatar
水落(YangLei) committed
193
                                component: () => import('@/pages/system/parameter/operation/index.vue'),
水落(YangLei)'s avatar
水落(YangLei) committed
194 195 196 197 198 199
                            },
                        ],
                    },
                    {
                        path: 'log',
                        name: '日志管理',
200
                        component: RouterView,
水落(YangLei)'s avatar
水落(YangLei) committed
201 202 203 204
                        children: [
                            {
                                path: 'login',
                                name: '登录日志',
水落(YangLei)'s avatar
水落(YangLei) committed
205
                                component: () => import('@/pages/system/log/login_log'),
水落(YangLei)'s avatar
水落(YangLei) committed
206 207 208 209
                            },
                            {
                                path: 'operation',
                                name: '操作日志',
水落(YangLei)'s avatar
水落(YangLei) committed
210
                                component: () => import('@/pages/system/log/operation/index.vue'),
水落(YangLei)'s avatar
水落(YangLei) committed
211 212 213 214 215
                            },
                        ],
                    },
                    {
                        path: 'task',
水落(YangLei)'s avatar
水落(YangLei) committed
216
                        name: '任务',
水落(YangLei)'s avatar
水落(YangLei) committed
217
                        component: () => import('@/pages/system/task/index.vue'),
水落(YangLei)'s avatar
水落(YangLei) committed
218 219 220
                    },
                ],
            },
陈浩玮's avatar
设备  
陈浩玮 committed
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
            {
                path: 'oceanus',
                name: '设备管理',
                meta: {
                    icon: 'control',
                },
                component: PageTemplateView,
                children: [
                    {
                        path: 'category',
                        name: '分类配置',
                        component: () => import('@/pages/oceanus/category/index.vue'),
                    },
                    {
                        path: 'equipment',
                        name: '设备台账',
                        component: () => import('@/pages/oceanus/equipment/index.vue'),
                    },
                ],
            },
水落(YangLei)'s avatar
水落(YangLei) committed
241 242 243 244 245 246 247 248 249 250 251 252 253 254
            {
                path: 'user',
                name: '个人中心',
                meta: { icon: 'user' },
                component: () => import('@/pages/user/index.vue'),
            },
        ],
    },
];

// 路由配置
const options = {
    mode: 'history',
    routes: [...globalRoutes, ...hasAuthorityRoutes],
wb-ct393452's avatar
wb-ct393452 committed
255 256 257
};

export default options;