import Layout from '@/layout/Index.vue'

export const routes = [
    {
        path: '/',
        component: Layout,
        redirect: '/index',
        meta: {name: '首页', icon: 'el-icon-s-home'},
        children: [
            {
                path: '/index',
                name: 'Home',
                component: () => import('../views/home/Home.vue'),
            }
        ]
    },
    {
        path: '/visual',
        component: Layout,
        redirect: '/visual/index',
        meta: {name: '可视化', icon: 'el-icon-s-home'},
        children: [
            {
                path: '/visual/index',
                name: 'Visual',
                meta: {name: '可视化驾驶舱'},
                component: () => import('../views/visual/Visual.vue'),
            },
            {
                path: '/visual/static',
                name: 'Static',
                meta: {name: '统计总览'},
                component: () => import('../views/visual/Static.vue'),
            }
        ]
    },
    {
        path: '/random',
        component: Layout,
        redirect: '/random/tag',
        meta: {name: '双随机', icon: 'el-icon-s-management'},
        children: [
            {
                path: '/random/tag',
                name: 'Tag',
                meta: {name: '标签库管理'},
                component: () => import('../views/random/tag/Tag.vue'),
            },
            {
                path: '/random/tag/sub',
                name: 'SubTag',
                meta: {name: '下级标签库', parent: '/random/tag'},
                component: () => import('../views/random/tag/SubTag.vue'),
            },
            {
                path: '/random/random/rule',
                name: 'RandomRule',
                meta: {name: '日常抽查规则记录'},
                component: () => import('../views/random/random/RandomRule.vue'),
            },
            {
                path: '/random/random/check/record',
                name: 'RandomCheckRecord',
                meta: {name: '日常抽查规则记录'},
                component: () => import('../views/random/random/RandomCheckRecord.vue'),
            },
            {
                path: '/random/random/rule/setting',
                name: 'RandomRuleSetting',
                meta: {name: '日常抽查规则设置'},
                component: () => import('../views/random/random/RandomRuleSetting.vue'),
            },
            {
                path: '/random/random/rule/setting/form',
                name: 'RandomRuleSettingForm',
                meta: {name: '日常抽查规则设置'},
                component: () => import('../views/random/random/RandomRuleSettingForm.vue'),
            },
            {
                path: '/random/random/rule/detail',
                name: 'RandomRuleDetail',
                meta: {name: '日常抽查规则设置'},
                component: () => import('../views/random/random/RandomRuleDetail.vue'),
            },
            {
                path: '/random/special/notice',
                name: 'SpecialNotice',
                meta: {name: '专项检查通知记录'},
                component: () => import('../views/random/special/SpecialNotice.vue'),
            },
            {
                path: '/random/special/notice/detail',
                name: 'SpecialNoticeDetail',
                meta: {name: '专项检查通知记录'},
                component: () => import('../views/random/special/SpecialNoticeDetail.vue'),
            },
            {
                path: '/random/special/notice/form',
                name: 'SpecialNoticeForm',
                meta: {name: '专项检查通知记录'},
                component: () => import('../views/random/special/SpecialNoticeForm.vue'),
            },
            {
                path: '/random/special/rule/setting/form',
                name: 'SpecialRuleSettingForm',
                meta: {name: '专项检查规则设置'},
                component: () => import('../views/random/special/SpecialRuleSettingForm.vue'),
            },
            {
                path: '/random/special/rule/detail',
                name: 'SpecialRuleDetail',
                meta: {name: '专项检查规则设置'},
                component: () => import('../views/random/special/SpecialRuleDetail.vue'),
            },
            {
                path: '/random/special/rule',
                name: 'SpecialRule',
                meta: {name: '专项检查规则记录'},
                component: () => import('../views/random/special/SpecialRule.vue'),
            },
            {
                path: '/random/special/check/record',
                name: 'SpecialCheckRecord',
                meta: {name: '专项检查规则记录'},
                component: () => import('../views/random/special/SpecialCheckRecord.vue'),
            },
            {
                path: '/random/record/record',
                name: 'RecordList',
                meta: {name: '旧检查记录'},
                component: () => import('../views/random/record/Record.vue'),
            },
            {
                path: '/random/record/detail',
                name: 'RecordDetail',
                meta: {name: '旧检查详情'},
                component: () => import('../views/random/record/Detail.vue'),
            }
        ]
    },
    {
        path: '/monitor',
        component: Layout,
        redirect: '/monitor/random',
        meta: {name: '执法监督', icon: 'el-icon-s-management'},
        children: [
            {
                path: '/monitor/random',
                name: 'Random',
                meta: {name: '日常抽查'},
                component: () => import('../views/monitor/random/Random.vue'),
            },
            // {
            //     path: '/monitor/test',
            //     name: 'Random',
            //     meta: { name: '日常抽查' },
            //     component: () => import('../views/monitor/test/Test.vue'),
            // },
            {
                path: '/monitor/random/detail',
                name: 'RandomDetail',
                meta: {name: '详情', parent: '/monitor/random'},
                component: () => import('../views/monitor/random/RandomDetail.vue'),
            },
            {
                path: '/monitor/special',
                name: 'Special',
                meta: {name: '专项检查'},
                component: () => import('../views/monitor/special/Special.vue'),
            },
            {
                path: '/monitor/special/detail',
                name: 'SpecialDetail',
                meta: {name: '详情', parent: '/monitor/special'},
                component: () => import('../views/monitor/special/SpecialDetail.vue'),
            },
            {
                path: '/monitor/report',
                name: 'Report',
                meta: {name: '举报核查'},
                component: () => import('../views/monitor/report/Report.vue'),
            },
            {
                path: '/monitor/report/detail',
                name: 'ReportDetail',
                meta: {name: '详情', parent: '/monitor/report'},
                component: () => import('../views/monitor/report/ReportDetail.vue'),
            },
            {
                path: '/monitor/check',
                name: 'Check',
                meta: {name: '检查配置'},
                component: () => import('../views/monitor/check/Check.vue'),
            },
            {
                path: '/monitor/hometown',
                name: 'Hometown',
                meta: {name: '乡镇检查'},
                component: () => import('../views/monitor/hometown/Hometown.vue'),
            },
            {
                path: '/monitor/hometown/detail',
                name: 'HometownDetail',
                meta: {name: '详情', parent: '/monitor/hometown'},
                component: () => import('../views/monitor/hometown/HometownDetail.vue'),
            },
            {
                path: '/monitor/other',
                name: 'Task',
                meta: {name: '其他任务'},
                component: () => import('../views/monitor/other/Other.vue'),
            },
            {
                path: '/monitor/other/detail',
                name: 'OtherDetail',
                meta: {name: '详情', parent: '/monitor/other'},
                component: () => import('../views/monitor/other/OtherDetail.vue'),
            },
            {
                path: '/monitor/limitApproval',
                name: 'LimitApproval',
                meta: {name: '限改审批'},
                component: () => import('../views/monitor/limitApproval/Index.vue'),
            },
            {
                path: '/monitor/reportApproval',
                name: 'ReportApproval',
                meta: {name: '举报核查审批'},
                component: () => import('../views/monitor/reportApproval/Index.vue'),
            },
            {
                path: '/monitor/reportApproval/detail',
                name: 'ReportApprovalDetail',
                meta: {name: '详情', parent: '/monitor/report'},
                component: () => import('../views/monitor/reportApproval/Detail.vue'),
            },
            {
                path: '/monitor/limitApproval/detail',
                name: 'LimitApprovalDetail',
                meta: {name: '详情', parent: '/monitor/limitApproval'},
                component: () => import('../views/monitor/limitApproval/DataDetail.vue'),
            },
            {
                path: '/monitor/check/detail',
                name: 'CheckDetail',
                meta: {name: '详情', parent: '/monitor/check'},
                component: () => import('../views/monitor/check/CheckDetail.vue'),
            },
            {
                path: '/monitor/template/detail',
                name: 'TemplateDetail',
                meta: {name: '模板详情', parent: '/monitor/check'},
                component: () => import('../views/monitor/check/component/TemplateDetail.vue'),
            },
            {
                path: '/monitor/template/edit',
                name: 'TemplateEdit',
                meta: {name: '模板编辑', parent: '/monitor/check'},
                component: () => import('../views/monitor/check/component/TemplateEdit.vue'),
            },
            {
                path: '/monitor/template/add',
                name: 'TemplateAdd',
                meta: {name: '模板新增', parent: '/monitor/check'},
                component: () => import('../views/monitor/check/component/TemplateAdd.vue'),
            },
            {
                path: '/monitor/check/add',
                name: 'CheckAdd',
                meta: {name: '新增', parent: '/monitor/check'},
                component: () => import('../views/monitor/check/CheckEdit.vue'),
            },
            {
                path: '/monitor/check/edit',
                name: 'CheckEdit',
                meta: {name: '编辑', parent: '/monitor/check'},
                component: () => import('../views/monitor/check/CheckEdit.vue'),
            },
            {
                path: '/monitor/check/copy',
                name: 'CheckCopy',
                meta: {name: '复制', parent: '/monitor/check'},
                component: () => import('../views/monitor/check/CheckCopy.vue'),
            },
            {
                path: '/monitor/book',
                name: 'Book',
                meta: {name: '手册配置'},
                component: () => import('../views/monitor/book/Book.vue'),
                children: []
            },
            {
                path: '/monitor/book/detail',
                name: 'BookDetail',
                meta: {name: '详情', parent: '/monitor/book'},
                component: () => import('../views/monitor/book/BookDetail.vue'),
            },
            {
                path: '/monitor/book/edit',
                name: 'BookEdit',
                meta: {name: '编辑', parent: '/monitor/book'},
                component: () => import('../views/monitor/book/BookEdit.vue'),
            }
        ]
    },
    {
        path: '/resource',
        component: Layout,
        redirect: '/resource/index',
        meta: {name: '社会资源', icon: 'el-icon-s-help'},
        children: [
            {
                path: '/resource/index',
                name: 'Resource',
                meta: {name: '执法对象'},
                component: () => import('../views/resource/Resource.vue')
            },
            {
                path: '/resource/detail',
                name: 'ResourceDetail',
                meta: {name: '详情', parent: '/resource/index'},
                component: () => import('../views/resource/ResourceDetail.vue'),
            },
            {
                path: '/resource/add',
                name: 'ResourceAdd',
                meta: {name: '新增', parent: '/resource/index'},
                component: () => import('../views/resource/ResourceEdit.vue'),
            },
            {
                path: '/resource/edit',
                name: 'ResourceEdit',
                meta: {name: '编辑', parent: '/resource/index'},
                component: () => import('../views/resource/ResourceEdit.vue'),
            },
        ]
    },
    {
        path: '/punishment',
        component: Layout,
        redirect: '/punishment',
        meta: {name: '违法占道', icon: 'el-icon-s-release'},
        children: [
            {
                path: 'index',
                name: 'Punishment',
                meta: {name: '违法占道执法'},
                component: () => import('../views/punishment/Punishment.vue')
            },
            {
                path: 'detail/:pid',
                name: 'PunishmentDetail',
                meta: {name: '违法占道详情', parent: '/punishment/index'},
                component: () => import('../views/punishment/Detail.vue')
            }
        ]
    },

    {
        path: '/device',
        component: Layout,
        redirect: '/device/manage',
        meta: {name: '执法音视频', icon: 'el-icon-video-camera-solid'},
        children: [
            {
                path: '/device/manage',
                name: 'ManageIndex',
                meta: {name: '执法设备管理'},
                component: () => import('../views/device/manage/Index.vue')
            },
            {
                path: '/device/video',
                name: 'VideoIndex',
                meta: {name: '执法音视频'},
                component: () => import('../views/device/video/Index.vue')
            },
            {
                path: '/device/video/detail',
                name: 'VideoDetail',
                meta: {name: '详情', parent: '/device/video'},
                component: () => import('../views/device/video/DataDetail.vue'),
            },
            {
                path: '/device/video/edit/:id',
                name: 'VideoEdit',
                meta: {name: '编辑执法音视频', parent: '/device/video'},
                component: () => import('../views/device/video/Edit.vue'),
            },
        ]
    },
    {
        path: '/system',
        component: Layout,
        redirect: '/system/index',
        meta: {name: '系统配置', icon: 'el-icon-s-tools'},
        children: [
            {
                path: '/system/index',
                name: 'SystemStandard',
                meta: { name: '抽查标准公示' },
                component: () => import('../views/system/Standard.vue')
            },
            {
                path: '/system/edit/:id?',
                name: 'SystemStandardEdit',
                meta: { name: '编辑抽查标准', parent: '/system/index' },
                component: () => import('../views/system/StandardEdit.vue')
            },
            {
                path: '/system/info/:id?',
                name: 'SystemStandardDetail',
                meta: { name: '抽查标准详情', parent: '/system/index' },
                component: () => import('../views/system/StandardDetail.vue')
            },
            {
                path: '/system/rule',
                name: 'SystemRule',
                meta: { name: '抽查细则公示' },
                component: () => import('../views/system/Rule.vue')
            },
            {
                path: '/system/rule/edit/:id?',
                name: 'SystemRuleEdit',
                meta: { name: '编辑抽查细则', parent: '/system/rule' },
                component: () => import('../views/system/RuleEdit.vue')
            }
        ]
    },
    {
        path: '/integrated',
        component: Layout,
        redirect: '/integrated/org',
        meta: {name: '综合管理', icon: 'el-icon-s-operation'},
        children: [
            {
                path: '/integrated/org',
                name: 'IntegratedOrg',
                meta: { name: '机构管理' },
                component: () => import('../views/integrated/Org.vue')
            },
            {
                path: '/integrated/org/detail/:id',
                name: 'IntegratedOrgDetail',
                meta: { name: '机构详情', parent: '/integrated/org' },
                component: () => import('../views/integrated/OrgDetail.vue')
            },
            {
                path: '/integrated/role',
                name: 'IntegratedRole',
                meta: { name: '角色管理' },
                component: () => import('../views/integrated/Role.vue')
            },
            {
                path: '/integrated/user',
                name: 'IntegratedUser',
                meta: { name: '人员管理' },
                component: () => import('../views/integrated/User.vue')
            },
            {
                path: '/integrated/user/detail/:id',
                name: 'IntegratedUserDetail',
                meta: { name: '人员详情', parent: '/integrated/user' },
                component: () => import('../views/integrated/UserDetail.vue')
            },
            {
                path: '/integrated/menu',
                name: 'IntegratedMenu',
                meta: { name: '菜单管理' },
                component: () => import('../views/integrated/Menu.vue')
            }
        ]
    },
    {
        path: '/logs',
        component: Layout,
        redirect: '/logs/user',
        meta: {name: '日志管理', icon: 'el-icon-s-operation'},
        children: [
            {
                path: '/logs/user',
                name: 'userLog',
                meta: { name: '执法人员变动日志' },
                component: () => import('../views/logs/UserLog.vue')
            },
            {
                path: '/log/index',
                name: 'enforceJobLog',
                meta: { name: '任务指派日志' },
                component: () => import('../views/logs/EnforceJobLog.vue')
            },
            {
                path: '/log/obj',
                name: 'enforceObj',
                meta: { name: '执法对象变动日志' },
                component: () => import('../views/logs/EnforceObjChangeLog.vue')
            }
        ]
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('../views/login/Login.vue')
    },
    {
        path: '/500',
        name: "500",
        component: () => import('../views/500.vue')
    },
    {
        path: '/401',
        name: "401",
        component: () => import('../views/401.vue')
    },
    {
        path: '*',
        name: "404",
        component: () => import('../views/404.vue')
    }
]
