import Layout from "~src/layout/index.vue";

//路由菜单系统内置页面配置, noMenuBar: true 不显示在菜单栏记录里
export default [
    {
        path: '/',
        redirect: '/home/index',
    },
    {
        path: '/login',
        name: 'login',
        meta: {title: '登录'},
        component: () => import('~src/views/login/index.vue')
    },
    {
        path: '/home',
        name: 'home',
        redirect: '/home/index',
        meta: {title: '门户'},
        component: Layout,
        children: [
            {
                path: '/home/index',
                name: 'home-index',
                meta: {title: '普通权限'},
                component: () => import('~src/views/home/index.vue')
            },
            {
                path: '/home/admin',
                name: 'home-admin',
                meta: {title: '领导权限'},
                component: () => import('~src/views/home/admin.vue')
            },
            {
                path: '/home/task',
                name: 'home-task',
                meta: {title: '审批管理'},
                component: () => import('~src/views/home/task.vue')
            },
            {
                path: '/home/task-details',
                name: 'home-task-details',
                meta: {title: '任务详情', noMenuBar: true},
                component: () => import('~src/views/home/task-details.vue')
            },
            {
                path: '/home/budget',
                name: 'home-budget',
                meta: {title: '公司经营预算'},
                component: () => import('~src/views/home/budget.vue')
            },
            {
                path: '/home/budget-form',
                name: 'home-budget-form',
                meta: {title: '公司经营预算信息'},
                component: () => import('~src/views/home/budget-form.vue')
            },
            {
                path: '/home/budget-chart',
                name: 'home-budget-chart',
                meta: {title: '公司经营预算报表'},
                component: () => import('~src/views/home/budget-chart.vue')
            }
        ],
    },
    {
        path: '/project',
        name: 'project',
        redirect: '/project/index',
        meta: {title: '项目管理'},
        component: Layout,
        children: [
            {
                path: '/project/index',
                name: 'project-index',
                meta: {title: '项目列表'},
                component: () => import('~src/views/project/index.vue')
            },
            {
                path: '/project/list-info',
                name: 'project-list-info',
                meta: {title: '项目信息'},
                component: () => import('~src/views/project/list-info.vue')
            },
            {
                path: '/project/reimburse',
                name: 'project-reimburse',
                meta: {title: '项目报销'},
                component: () => import('~src/views/project/reimburse.vue')
            },
            {
                path: '/project/budget',
                name: 'project-budget',
                meta: {title: '项目预算'},
                component: () => import('~src/views/project/budget.vue')
            },
            {
                path: '/project/budget-form',
                name: 'project-budget-form',
                meta: {title: '项目预算信息'},
                component: () => import('~src/views/project/budget-form.vue')
            },
        ],
    },
    {
        path: '/program',
        name: 'program',
        redirect: '/program/index',
        meta: {title: '计划管理'},
        component: Layout,
        children: [
            {
                path: '/program/index',
                name: 'program-index',
                meta: {title: '制定计划'},
                component: () => import('~src/views/program/index.vue')
            },
            {
                path: '/program/index-info',
                name: 'program-index-info',
                meta: {title: '计划详情'},
                component: () => import('~src/views/program/edit-info.vue')
            },
            {
                path: '/program/task',
                name: 'program-task',
                meta: {title: '计划任务'},
                component: () => import('~src/views/program/task.vue')
            },
        ],
    },
    {
        path: '/logs',
        name: 'logs',
        redirect: '/logs/index',
        meta: {title: '日志管理'},
        component: Layout,
        children: [
            {
                path: '/logs/index',
                name: 'logs-index',
                meta: {title: '历史日志'},
                component: () => import('~src/views/logs/index.vue')
            },
        ],
    },
    {
        path: '/user',
        name: 'user',
        redirect: '/user/index',
        meta: {title: '个人中心'},
        component: Layout,
        children: [
            {
                path: '/user/index',
                name: 'user-index',
                meta: {title: '个人资料'},
                component: () => import('~src/views/user/index.vue')
            },
            {
                path: '/user/config',
                name: 'user-config',
                meta: {title: '主题设置'},
                component: () => import('~src/views/user/config.vue')
            },
        ],
    },
    {
        path: '/static',
        name: 'static',
        redirect: '/static/static',
        meta: {title: '报表数据'},
        component: Layout,
        children: [
            {
                path: '/static/static',
                name: 'static-project',
                meta: {title: '项目报表'},
                component: () => import('~src/views/static/project.vue')
            },
            {
                path: '/static/plan',
                name: 'static-plan',
                meta: {title: '计划报表'},
                component: () => import('~src/views/static/plan.vue')
            },
            {
                path: '/system/parameter',
                name: 'system-parameter',
                meta: {title: '参数配置'},
                component: () => import('~src/views/system/parameter.vue')
            },
            {
                path: '/system/organization',
                name: 'system-organization',
                meta: {title: '组织架构管理'},
                component: () => import('~src/views/system/organization.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/parameter',
                name: 'system-parameter',
                meta: {title: '参数配置'},
                component: () => import('~src/views/system/parameter.vue')
            },
            {
                path: '/system/organization',
                name: 'system-organization',
                meta: {title: '组织架构管理'},
                component: () => import('~src/views/system/organization.vue')
            },

        ],
    },
    {
        path: '/risk',
        name: 'risk',
        redirect: '/risk/warning',
        meta: {title: '风险预警'},
        component: Layout,
        children: [
            {
                path: '/risk/warning',
                name: 'risk-warning',
                meta: {title: '风险预警'},
                component: () => import('~src/views/risk/warning.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'
    }
]
