// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';

// 启用路由
Vue.use(Router);
// 导出路由
export default new Router({
    routes: [{
            path: '/',
            redirect: '/qualification/jobApplication',
            name: '',
            component: index,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },
        {
            path: '/login',
            name: '登录',
            component: login,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },
        {
            path: '/qualification/jobApplication/:mode/:id',
            name: '首页',
            component: index,
            iconCls: 'el-icon-tickets',
            children: [
                {
                    path: '/qualification/jobApplication',
                    name: "任职申请",
                    component: resolve => require(["@/views/qualification/jobApplication.vue"], resolve),
                    meta: {
                        requireAuth: true
                    }
            },
            {
                path: '/qualification/studyExam',
                name: "学习考试",
                component: resolve => require(["@/views/qualification/studyExam"], resolve),
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/qualification/professional',
                name: "专业回馈",
                component: resolve => require(["@/views/qualification/professional"], resolve),
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/qualification/evidence',
                name: "个人行为举证",
                component: resolve => require(["@/views/qualification/evidence"], resolve),
                meta: {
                    requireAuth: true
                }
            },
                {
                    path: '/qualification/appliedList',
                    name: "已申报任职资格",
                    component: resolve => require(["@/views/qualification/appliedList"], resolve),
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path: '/management/professionalManagement',
                    name: "专业回馈审核",
                    component: resolve => require(["@/views/management/professionalManagement"], resolve),
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path: '/management/qualificationReview',
                    name: "资格审核",
                    component: resolve => require(["@/views/management/qualificationReview"], resolve),
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path: '/management/setting',
                    name: "信息内置",
                    component: resolve => require(["@/views/management/setting"], resolve),
                    meta: {
                        requireAuth: true
                    }
                },

            ]
        }
    ]
})
