import Layout from '~src/layout/index.vue'

//路由菜单系统内置页面配置
export default [
    {
        path: '/',
        redirect: '/index',
    },
    {
        path: '/login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import('~src/views/login/index.vue'),
    },
    {
        path: '/home',
        name: 'home',
        redirect: '/index',
        meta: { title: '首页' },
        component: Layout,
        children: [
            {
                path: '/index',
                name: 'index',
                meta: { title: '首页' },
                component: () => import('~src/views/home/index.vue'),
            },
            {
                path: '/user-info',
                name: 'user-info',
                meta: { title: '个人中心' },
                component: () => import('~src/views/user/index.vue'),
            },
        ],
    },
    {
        path: '/manager/projectinfo',
        name: 'projectinfo1',
        redirect: '/manager/projectinfo/list',
        meta: { title: '项目管理' },
        component: Layout,
        children: [
            {
                path: '/manager/projectinfo/archivetreeconfig',
                name: 'projectinfo_archivetreeconfig',
                meta: { title: '项目归档树' },
                component: () => import('~src/views/project/tree.vue'),
            },
            {
                path: '/manager/projectinfo/list',
                name: 'projectinfo/list',
                meta: { title: '项目列表' },
                component: () => import('~src/views/project/list.vue'),
            },
        ],
    },
    {
        path: '/desk',
        name: 'desk',
        redirect: '/desk/wbs',
        meta: { title: '系统配置' },
        component: Layout,
        children: [
            {
                path: '/desk/wbs',
                name: 'wbsinfo',
                meta: { title: 'WBS动态库' },
                component: () => import('~src/views/desk/wbs.vue'),
            },
            {
                path: '/desk/meta-data',
                name: 'metadata',
                meta: { title: '元数据管理' },
                component: () => import('~src/views/desk/meta.vue'),
            },
            {
                path: '/desk/image',
                name: 'imageconfig',
                meta: { title: '影像分类配置' },
                component: () => import('~src/views/desk/image.vue'),
            },
            {
                path: '/desk/archive',
                name: 'archivetree',
                meta: { title: '归档树管理' },
                component: () => import('~src/views/desk/archive.vue'),
            },
            {
                path: '/desk/test-classify',
                name: 'testclassify',
                meta: { title: '试验分类配置' },
                component: () => import('~src/views/desk/test-classify.vue'),
            },
            {
                path: '/desk/test-collect',
                name: 'testcollect',
                meta: { title: '试验汇总分类' },
                component: () => import('~src/views/desk/test-collect.vue'),
            },
            {
                path: '/desk/test-param',
                name: 'parameter',
                meta: { title: '试验参数配置' },
                component: () => import('~src/views/desk/test-param.vue'),
            },
            {
                path: '/desk/system-unit',
                name: 'systemUnit',
                meta: { title: '系统计量单元' },
                component: () => import('~src/views/desk/system-unit.vue'),
            },
            {
                path: '/desk/interim-pay',
                name: 'interimPay',
                meta: { title: '系统中期支付项' },
                component: () => import('~src/views/desk/interim-pay.vue'),
            },
        ],
    },
    {
        path: '/excel',
        name: 'excel',
        redirect: '/exctab/exceltab',
        meta: { title: '表单管理' },
        component: Layout,
        children: [
            {
                path: '/exctab/exceltab',
                name: 'exceltab',
                meta: { title: '清表列表' },
                component: () => import('~src/views/exctab/exceltab.vue'),
            },
        ],
    },
    {
        path: '/certificate',
        name: 'certificate',
        redirect: '/certificate/management',
        meta: { title: '电签管理' },
        component: Layout,
        children: [
            {
                path: '/certificate/admin',
                name: '/certificate/management',
                meta: { title: '证书管理' },
                component: () => import('~src/views/certificate/admin.vue'),
            },
            {
                path: '/certificate/list',
                name: '/certificate/list',
                meta: { title: '证书列表' },
                component: () => import('~src/views/certificate/list.vue'),
            },
        ],
    },
    {
        path: '/authority',
        name: 'authority',
        redirect: '/authority/role',
        meta: { title: '权限管理' },
        component: Layout,
        children: [
            {
                path: '/authority/role',
                name: 'role',
                meta: { title: '角色管理' },
                component: () => import('~src/views/authority/role.vue'),
            },
            {
                path: '/authority/data-scope',
                name: 'data_scope',
                meta: { title: '数据权限' },
                component: () => import('~src/views/authority/data.vue'),
            },
            {
                path: '/authority/api-scope',
                name: 'api_scope',
                meta: { title: '接口权限' },
                component: () => import('~src/views/authority/api.vue'),
            },
        ],
    },
    {
        path: '/system',
        name: 'system',
        redirect: '/system/client',
        meta: { title: '系统管理' },
        component: Layout,
        children: [
            {
                path: '/system/client',
                name: 'client',
                meta: { title: '应用管理' },
                component: () => import('~src/views/system/client.vue'),
            },
            {
                path: '/system/tenant',
                name: 'tenant',
                meta: { title: '租户管理' },
                component: () => import('~src/views/system/tenant.vue'),
            },
            {
                path: '/system/param',
                name: 'param',
                meta: { title: '参数管理' },
                component: () => import('~src/views/system/param.vue'),
            },
            {
                path: '/system/menu',
                name: 'menu',
                meta: { title: '菜单管理' },
                component: () => import('~src/views/system/menu.vue'),
            },
            {
                path: '/system/menu-top',
                name: 'topmenu',
                meta: { title: '顶部菜单' },
                component: () => import('~src/views/system/menu-top.vue'),
            },
            {
                path: '/system/app',
                name: 'app',
                meta: { title: 'App管理' },
                component: () => import('~src/views/system/app.vue'),
            },
            {
                path: '/system/user',
                name: 'user',
                meta: { title: '用户管理' },
                component: () => import('~src/views/system/user.vue'),
            },
            {
                path: '/system/post',
                name: 'post',
                meta: { title: '岗位管理' },
                component: () => import('~src/views/system/post.vue'),
            },
            {
                path: '/system/dept',
                name: 'dept',
                meta: { title: '机构管理' },
                component: () => import('~src/views/system/dept.vue'),
            },
            {
                path: '/system/dict',
                name: 'dict',
                meta: { title: '系统字典' },
                component: () => import('~src/views/system/dict.vue'),
            },
            {
                path: '/system/dictbiz',
                name: 'dictbiz',
                meta: { title: '业务字典' },
                component: () => import('~src/views/system/dictbiz.vue'),
            },
            {
                path: '/system/announcement',
                name: 'announcement',
                meta: { title: '系统公告' },
                component: () => import('~src/views/system/notice.vue'),
            },
        ],
    },
    {
        path: '/resource',
        name: 'resource',
        redirect: '/resource/oss',
        meta: { title: '资源管理' },
        component: Layout,
        children: [
            {
                path: '/resource/oss',
                name: 'oss',
                meta: { title: '对象存储' },
                component: () => import('~src/views/resource/oss.vue'),
            },
            {
                path: '/resource/attach',
                name: 'attach',
                meta: { title: '附件管理' },
                component: () => import('~src/views/resource/attach.vue'),
            },
            {
                path: '/resource/sms',
                name: 'sms',
                meta: { title: '短信配置' },
                component: () => import('~src/views/resource/sms.vue'),
            },
        ],
    },
    {
        path: '/403',
        name: '403',
        meta: { title: '403' },
        component: () => import('~src/views/error/403.vue'),
    },
    {
        path: '/404',
        name: '404',
        meta: { title: '404' },
        component: () => import('~src/views/error/404.vue'),
    },
    {
        path: '/500',
        name: '500',
        meta: { title: '500' },
        component: () => import('~src/views/error/500.vue'),
    },
    {
        path: '/:path(.*)*',
        redirect: '/404',
    },
]
