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

//路由菜单系统内置页面配置
export default [
    {
        path: '/',
        name: 'index',
        meta: { title: '数据看板' },
        component: () => import('~src/views/home/datav.vue'),
    },
    {
        path: '/login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import('~src/views/login/index.vue'),
    },
    {
        path: '/anomaly',
        name: 'anomaly',
        redirect: '/anomaly/invest',
        meta: { title: '异常管理' },
        component: Layout,
        children: [
            {
                path: '/anomaly/invest',
                name: 'anomaly-invest',
                meta: { title: '项目异常管理' },
                component: () => import('~src/views/anomaly/index.vue'),
            },
        ],
    },
    {
        path: '/project',
        name: 'project',
        redirect: '/project/collect',
        meta: { title: '项目管理' },
        component: Layout,
        children: [
            {
                path: '/project/collect',
                name: 'project-collect',
                meta: { title: '项目资料收集' },
                component: () => import('~src/views/project/middle.vue'),
            },
            {
                path: '/project/ledger',
                name: 'project-ledger',
                meta: { title: '项目台账' },
                component: () => import('~src/views/project/ledger.vue'),
            },
        ],
    },
    {
        path: '/system',
        name: 'system',
        redirect: '/system/user',
        meta: { title: '系统管理' },
        component: Layout,
        children: [
            {
                path: '/system/user',
                name: 'system-user',
                meta: { title: '用户管理' },
                component: () => import('~src/views/system/user.vue'),
            },
            {
                path: '/system/menu',
                name: 'system-menu',
                meta: { title: '菜单管理' },
                component: () => import('~src/views/system/menu.vue'),
            },
            {
                path: '/system/role',
                name: 'system-role',
                meta: { title: '角色管理' },
                component: () => import('~src/views/system/role.vue'),
            },
            {
                path: '/system/set',
                name: 'system-set',
                meta: { title: '系统设置' },
                component: () => import('~src/views/system/set.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',
    },
]
