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

水落(YangLei)'s avatar
水落(YangLei) committed
3 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',
        name: '首页',
        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 58 59 60 61 62 63 64
                        component: () => import('@/pages/dashboard/workbench'),
                    },
                    {
                        path: 'analysis',
                        name: '分析页',
                        component: () => import('@/pages/dashboard/analysis'),
                    },
                ],
            },
            {
                path: 'system',
                name: '系统管理',
                meta: {
                    icon: 'setting',
                    page: {
                        cacheAble: true,
wb-ct393452's avatar
wb-ct393452 committed
65
                    },
水落(YangLei)'s avatar
水落(YangLei) committed
66
                },
水落(YangLei)'s avatar
水落(YangLei) committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
                component: PageTemplateView,
                children: [
                    {
                        path: 'menu',
                        name: '菜单管理',
                        component: () => import('@/pages/system/view/menu'),
                    },
                    {
                        path: 'organization',
                        name: '组织管理',
                        children: [
                            {
                                path: 'job',
                                name: '岗位管理',
                                component: () =>
                                    import('@/pages/system/view/organization/jobsmanagement/Jobs.vue'),
                            },
                            {
                                path: 'user',
                                name: '用户管理',
                                component: () =>
                                    import('@/pages/system/view/organization/usermanagement/User.vue'),
                            },
                            {
                                path: 'org',
                                name: '机构管理',
                                component: () =>
                                    import('@/pages/system/view/organization/orgmanagement/Org.vue'),
                            },
                        ],
                    },
                    {
                        path: 'role',
                        name: '角色管理',
                        component: () => import('@/pages/system/view/role'),
                    },
                    {
                        path: 'parameter',
                        name: '参数管理',
                        children: [
                            {
                                path: 'business',
                                name: '业务参数',
                                component: () => import('@/pages/system/view/parameter/business/index.vue'),
                            },
                            {
                                path: 'operation',
                                name: '运维参数',
                                component: () => import('@/pages/system/view/parameter/operation/index.vue'),
                            },
                        ],
                    },
                    {
                        path: 'log',
                        name: '日志管理',
                        children: [
                            {
                                path: 'login',
                                name: '登录日志',
                                component: () => import('@/pages/system/view/log/login_log'),
                            },
                            {
                                path: 'operation',
                                name: '操作日志',
                                component: () => import('@/pages/system/view/log/operation/index.vue'),
                            },
                        ],
                    },
                    {
                        path: 'task',
                        name: '任务管理',
                        component: () => import('@/pages/system/view/task/index.vue'),
                    },
                ],
            },
            {
                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
156 157 158
};

export default options;