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: '/anomaly/progress?type=progress',
                name: 'anomaly-progress',
                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: '项目资料收集' },
                redirect: '/project/collect/middle',
                children: [
                    {
                        path: '/project/collect/middle',
                        name: 'project-collect-middle',
                        meta: { title: '项目资料收集-中间', parent: 'project-collect' },
                        component: () => import('~src/views/project/middle.vue'),
                    },
                    {
                        path: '/project/collect/admin',
                        name: 'project-collect-admin',
                        meta: { title: '项目管理', parent: 'project-collect' },
                        redirect: '/project/collect/admin/create',
                        children: [
                            {
                                path: '/project/collect/admin/create',
                                name: 'project-collect-admin-create',
                                meta: { title: '创建项目', parent: 'project-collect' },
                                component: () => import('~src/views/project/admin/create.vue'),
                            },
                            {
                                path: '/project/collect/admin/list',
                                name: 'project-collect-admin-list',
                                meta: { title: '项目列表', parent: 'project-collect' },
                                component: () => import('~src/views/project/admin/list.vue'),
                            },
                        ],
                    },
                    {
                        path: '/project/collect/gist',
                        name: 'project-collect-gist',
                        meta: { title: '工作要点管理', parent: 'project-collect' },
                        redirect: '/project/collect/gist/create',
                        children: [
                            {
                                path: '/project/collect/gist/create',
                                name: 'project-collect-gist-create',
                                meta: { title: '创建工作要点', parent: 'project-collect' },
                                component: () => import('~src/views/project/gist/create.vue'),
                            },
                            {
                                path: '/project/collect/gist/list',
                                name: 'project-collect-gist-list',
                                meta: { title: '工作要点列表', parent: 'project-collect' },
                                component: () => import('~src/views/project/gist/list.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',
    },
]
