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

//路由菜单系统内置页面配置
export default [
    {
        path: '/',
        name: 'index',
        meta: { title: '数据看板' },
        component: () => import('~src/views/home/datav.vue'),
    },
    {
        path: '/index2',
        name: 'index2',
        meta: { title: '数据看板' },
        component: () => import('~src/views/home2/datav.vue'),
    },
    {
        path: '/login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import('~src/views/login/index.vue'),
    },
    {
        path: '/os',
        name: 'os',
        meta: { title: '选择平台' },
        component: () => import('~src/views/login/os.vue'),
    },
    {
        path: '/other',
        name: 'other',
        redirect: '/anomaly',
        meta: { title: '其它页面' },
        component: Layout,
        children: [
            {
                path: '/anomaly',
                name: 'anomaly',
                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: '/project2',
        name: 'project2',
        redirect: '/project/data',
        meta: { title: '项目管理' },
        component: Layout2,
        children: [
            {
                path: '/project/data',
                name: 'project-data',
                meta: { title: '项目数据' },
                component: () => import('~src/views/project/data.vue'),
            },
        ],
    },
    {
        path: '/system2',
        name: 'system2',
        redirect: '/system/model',
        meta: { title: '工具设置' },
        component: Layout2,
        children: [
            {
                path: '/system2/model',
                name: 'system2-model',
                meta: { title: '参数设置' },
                component: () => import('~src/views/system2/model.vue'),
            },
            {
                path: '/system2/user',
                name: 'system2-user',
                meta: { title: '用户管理' },
                component: () => import('~src/views/system2/user.vue'),
            },
            {
                path: '/system2/role',
                name: 'system2-role',
                meta: { title: '角色管理' },
                component: () => import('~src/views/system2/role.vue'),
            },
            {
                path: '/system2/menu',
                name: 'system2-menu',
                meta: { title: '菜单管理' },
                component: () => import('~src/views/system2/menu.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',
    },
]
