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

//路由菜单系统内置页面配置
export default [
    {
        path: '/',
        redirect: '/home/index'
    },
    {
        path: '/login',
        name: 'login',
        meta: {title: '登录'},
        component: () => import('~src/views/login/index.vue')
    },
    {
        path: '/auth',
        name: 'auth',
        meta: {title: '授权登录'},
        component: () => import('~src/views/user/auth.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/config',
                name: 'home-config',
                meta: {title: '系统设置'},
                component: () => import('~src/views/home/config.vue')
            },
        ],
    },
    {
        path: '/lar-base-data',
        name: 'lar-base-data',
        redirect: '/lar-base-data/policy',
        meta: {title: '基础数据'},
        component: Layout,
        children: [
            {
                path: '/lar-base-data/policy',
                name: 'base-data-policy',
                meta: {title: '政策法规'},
                component: () => import('~src/views/base/policy.vue')
            },
            {
                path: '/base-data/agree',
                name: 'base-data-agree',
                meta: {title: '双方协议'},
                component: () => import('~src/views/base/agree.vue')
            },
            {
                path: '/base-data/land',
                name: 'base-data-land',
                meta: {title: '地类名库称'},
                component: () => import('~src/views/base/land.vue')
            },
            {
                path: '/base-data/crops',
                name: 'base-data-crops',
                meta: {title: '青苗名库称'},
                component: () => import('~src/views/base/crops.vue')
            },
            {
                path: '/base-data/region',
                name: 'base-data-region',
                meta: {title: '区域权限'},
                component: () => import('~src/views/base/region.vue')
            },
        ],
    },
    {
        path: '/lar-agree',
        name: 'lar-agree',
        redirect: '/lar-agree/land',
        meta: {title: '征拆协议'},
        component: Layout,
        children: [
            //征地补偿协议
            {
                path: '/lar-agree/land',
                name: 'lar-agree-land',
                meta: {title: '征地补偿协议'},
                component: () => import('~src/views/agree/land/land.vue')
            },
            {
                path: '/lar-agree/land/form',
                name: 'lar-agree-land-form',
                meta: {title: '征地补偿协议表单'},
                component: () => import('~src/views/agree/land/form.vue')
            },
            //坟地补偿协议
            {
                path: '/lar-agree/tomb',
                name: 'lar-agree-tomb',
                meta: {title: '坟地补偿协议'},
                component: () => import('~src/views/agree/tomb/tomb.vue')
            },
            {
                path: '/lar-agree/tomb/form',
                name: 'lar-agree-tomb-form',
                meta: {title: '坟地补偿协议表单'},
                component: () => import('~src/views/agree/tomb/form.vue')
            },
            //专项设施协议
            {
                path: '/lar-agree/special',
                name: 'lar-agree-special',
                meta: {title: '专项设施协议'},
                component: () => import('~src/views/agree/special/special.vue')
            },
            {
                path: '/lar-agree/special/form',
                name: 'lar-agree-special-form',
                meta: {title: '专项设施协议表单'},
                component: () => import('~src/views/agree/special/form.vue')
            },
        ],
    },
    {
        path: '/lar-settle',
        name: 'lar-settle',
        redirect: '/lar-settle/index',
        meta: {title: '征拆结算'},
        component: Layout,
        children: [
            {
                path: '/lar-settle/index',
                name: 'lar-settle-index',
                meta: {title: '结算管理'},
                component: () => import('~src/views/settle/index.vue')
            },
        ],
    },
    {
        path: '/lar-count',
        name: 'lar-count',
        redirect: '/lar-count/index',
        meta: {title: '统计管理'},
        component: Layout,
        children: [
            {
                path: '/lar-count/index',
                name: 'lar-count-index',
                meta: {title: '结算统计'},
                component: () => import('~src/views/count/index.vue')
            },
            {
                path: '/lar-count/map',
                name: 'lar-count-map',
                meta: {title: '地图地块'},
                component: () => import('~src/views/count/map.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'
    }
]
