import Layout from '@/layout'

export default [
    {
        path: '/home',
        hidden: true,
        component: Layout,
        redirect: '/home/index',
        meta: {title: '首页', icon: 'user'},
        children: [{
            path: 'index',
            name: 'homeIndex',
            component: () => import('@/views/patrol/home'),
            meta: {title: '首页', icon: 'user'},
        }]
    },
    {
        path: '/inspection',
        component: Layout,
        redirect: '/inspection/inquiry',
        meta: {title: '检查项目', icon: '检查项目', permissions: '检查项目'},
        children: [{
            path: 'classify',
            name: 'inspectionClassify',
            component: () => import('@/views/patrol/inspection/classify'),
            meta: {title: '项目分类', icon: '项目分类', permissions: '项目分类'},
        }, {
            path: 'inquiry',
            name: 'inspectionInquiry',
            component: () => import('@/views/patrol/inspection/inquiry'),
            meta: {title: '项目查询', icon: '项目查询', permissions: '项目'},
        }, {
            path: 'choose',
            name: 'inspectionChoose',
            component: () => import('@/views/patrol/inspection/choose'),
            meta: {title: '选择项', icon: '选择项', permissions: '项目'},
            children: [{
                path: 'add',
                name: 'inspectionChooseAdd',
                hidden: true,
                component: () => import('@/views/patrol/inspection/choose/edit'),
                meta: {title: '添加', activeMenu: '/inspection/choose', noCache: true},
            }, {
                path: 'edit',
                name: 'inspectionChooseEdit',
                hidden: true,
                component: () => import('@/views/patrol/inspection/choose/edit'),
                meta: {title: '编辑', activeMenu: '/inspection/choose', noCache: true},
            }],
        }, {
            path: 'number',
            name: 'inspectionNumber',
            component: () => import('@/views/patrol/inspection/number'),
            meta: {title: '数字项', icon: '数字项', permissions: '项目'},
            children: [{
                path: 'add',
                name: 'inspectionNumberAdd',
                hidden: true,
                component: () => import('@/views/patrol/inspection/number/edit'),
                meta: {title: '添加', activeMenu: '/inspection/number', noCache: true},
            }, {
                path: 'edit',
                name: 'inspectionNumberEdit',
                hidden: true,
                component: () => import('@/views/patrol/inspection/number/edit'),
                meta: {title: '编辑', activeMenu: '/inspection/number', noCache: true},
            }],
        }, {
            path: 'character',
            name: 'inspectionCharacter',
            component: () => import('@/views/patrol/inspection/character'),
            meta: {title: '文本项', icon: '文本项', permissions: '项目'},
            children: [{
                path: 'add',
                name: 'inspectionCharacterAdd',
                hidden: true,
                component: () => import('@/views/patrol/inspection/character/edit'),
                meta: {title: '添加', activeMenu: '/inspection/character', noCache: true},
            }, {
                path: 'edit',
                name: 'inspectionCharacterEdit',
                hidden: true,
                component: () => import('@/views/patrol/inspection/character/edit'),
                meta: {title: '编辑', activeMenu: '/inspection/character', noCache: true},
            }],
        }, {
            path: 'photo',
            name: 'inspectionPhoto',
            component: () => import('@/views/patrol/inspection/photo'),
            meta: {title: '拍照项', icon: '拍照项', permissions: '项目'},
            children: [{
                path: 'add',
                name: 'inspectionPhotoAdd',
                hidden: true,
                component: () => import('@/views/patrol/inspection/photo/edit'),
                meta: {title: '添加', activeMenu: '/inspection/photo', noCache: true},
            }, {
                path: 'edit',
                name: 'inspectionPhotoEdit',
                hidden: true,
                component: () => import('@/views/patrol/inspection/photo/edit'),
                meta: {title: '编辑', activeMenu: '/inspection/photo', noCache: true},
            }],
        }, {
            path: 'situation',
            hidden: true,
            name: 'inspectionSituation',
            component: () => import('@/views/patrol/inspection/situation'),
            meta: {title: '检查情况', icon: '检查情况'},
        }, {
            path: 'statistics',
            hidden: true,
            name: 'inspectionStatistics',
            component: () => import('@/views/patrol/inspection/statistics'),
            meta: {title: '检查统计', icon: '检查统计'},
        }]
    },
    {
        path: '/check-route',
        component: Layout,
        redirect: '/check-route/inquire',
        meta: {title: '检查路线', icon: '检查路线', permissions: '检查路线'},
        children: [
            {
                path: 'inquire',
                name: 'CheckRouteInquire',
                component: () => import('@/views/patrol/check-route/inquire'),
                meta: {title: '路线查询', icon: '路线查询', permissions: '路线查询'},
                children: [
                    {
                        path: 'add',
                        name: 'CheckRouteInquireAdd',
                        hidden: true,
                        component: () => import('@/views/patrol/check-route/inquire/edit'),
                        meta: {title: '添加', activeMenu: '/check-route/inquire', noCache: true},
                    }, {
                        path: 'edit',
                        name: 'CheckRouteInquireEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/check-route/inquire/edit'),
                        meta: {title: '编辑', activeMenu: '/check-route/inquire', noCache: true},
                    }
                ],
            }
        ]
    },
    {
        path: '/patrol',
        component: Layout,
        redirect: '/patrol/plan',
        meta: {title: '巡检计划', icon: '巡检计划', permissions: '巡检计划'},
        children: [
            {
                path: 'plan',
                name: 'PatrolPlan',
                component: () => import('@/views/patrol/patrol/plan'),
                meta: {title: '计划查询', icon: '计划查询', permissions: '巡检计划查询'},
                children: [
                    {
                        path: 'add',
                        name: 'PatrolPlanAdd',
                        hidden: true,
                        component: () => import('@/views/patrol/patrol/plan/edit'),
                        meta: {title: '添加', activeMenu: '/patrol/plan', noCache: true},
                    }, {
                        path: 'edit',
                        name: 'PatrolPlanEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/patrol/plan/edit'),
                        meta: {title: '编辑', activeMenu: '/patrol/plan', noCache: true},
                    }
                ],
            }, {
                path: 'task',
                name: 'PatrolTask',
                component: () => import('@/views/patrol/patrol/task'),
                meta: {title: '巡检任务', icon: '巡检任务', permissions: '巡检任务'},
                children: [
                    {
                        path: 'edit',
                        name: 'PatrolTaskEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/patrol/task/edit'),
                        meta: {title: '编辑', activeMenu: '/patrol/task', noCache: true},
                    }
                ],
            }, {
                path: 'task-record',
                name: 'PatrolTaskRecord',
                component: () => import('@/views/patrol/patrol/task-record'),
                meta: {title: '巡检任务记录', icon: '巡检任务记录', permissions: '巡检任务记录'},
                children: [
                    {
                        path: 'detail',
                        name: 'PatrolTaskRecordDetail',
                        hidden: true,
                        component: () => import('@/views/patrol/patrol/task-record/detail'),
                        meta: {title: '详情', activeMenu: '/patrol/task-record', noCache: true},
                    },{
                        path: 'detail-list',
                        name: 'PatrolTaskRecordDetailList',
                        hidden: true,
                        component: () => import('@/views/patrol/patrol/task-record/detail-list'),
                        meta: {title: '详情', activeMenu: '/patrol/task-record', noCache: true},
                    }
                ],
            }
        ]
    },
    {
        path: '/upkeep',
        component: Layout,
        hidden: true,
        redirect: '/upkeep/plan',
        meta: {title: '保养计划', icon: '保养计划', permissions: '保养计划'},
        children: [
            {
                path: 'plan',
                name: 'UpkeepPlan',
                component: () => import('@/views/patrol/upkeep/plan'),
                meta: {title: '计划查询', icon: '计划查询', permissions: '保养计划查询'},
                children: [
                    {
                        path: 'add',
                        name: 'UpkeepPlanAdd',
                        hidden: true,
                        component: () => import('@/views/patrol/upkeep/plan/edit'),
                        meta: {title: '添加', activeMenu: '/upkeep/plan', noCache: true},
                    }, {
                        path: 'edit',
                        name: 'UpkeepPlanEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/upkeep/plan/edit'),
                        meta: {title: '编辑', activeMenu: '/upkeep/plan', noCache: true},
                    }
                ],
            }, {
                path: 'task',
                name: 'UpkeepTask',
                component: () => import('@/views/patrol/upkeep/task'),
                meta: {title: '保养任务', icon: '保养任务', permissions: '保养任务'},
                children: [
                    {
                        path: 'edit',
                        name: 'UpkeepTaskEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/upkeep/task/edit'),
                        meta: {title: '编辑', activeMenu: '/upkeep/task', noCache: true},
                    }
                ],
            }]
    },
    {
        path: '/temporary-task',
        component: Layout,
        redirect: '/temporary-task/temporary-task',
        meta: {title: '临时任务', icon: '临时任务', permissions: '临时任务'},
        children: [
            {
                path: 'temporary-task',
                name: 'TemporaryTask',
                component: () => import('@/views/patrol/temporary-task/temporary-task'),
                meta: {title: '全部任务', icon: '全部任务', permissions: '全部临时任务'},
                children: [
                    {
                        path: 'feedback',
                        hidden: true,
                        name: 'TemporaryTaskFeedback',
                        component: () => import('@/views/patrol/temporary-task/temporary-task/feedback'),
                        meta: {title: '反馈', activeMenu: '/temporary-task/temporary-task', permissions: '临时任务反馈', noCache: true},
                    }
                ]
            },
            {
                path: 'statistics',
                name: 'TaskStatistics',
                component: () => import('@/views/patrol/temporary-task/statistics'),
                meta: {title: '任务统计', icon: '任务统计', permissions: '全部临时任务'},
            }
        ]
    },
    {
        path: '/device',
        component: Layout,
        redirect: '/device/building',
        meta: {title: '资产管理', icon: '资产管理', permissions: '资产管理'},
        children: [
            {
                path: 'building',
                name: 'DeviceBuilding',
                component: () => import('@/views/patrol/device/building'),
                meta: {title: '楼栋管理', icon: '楼栋管理', permissions: '楼栋管理'}
            },
            {
                path: 'floor',
                name: 'DeviceFloor',
                component: () => import('@/views/patrol/device/floor'),
                meta: {title: '楼层管理', icon: '楼层管理', permissions: '楼层管理'}
            },
            {
                path: 'room',
                name: 'DeviceRoom',
                component: () => import('@/views/patrol/device/room'),
                meta: {title: '房间管理', icon: '房间管理', permissions: '房间管理'},
                children: [
                    {
                        path: 'add',
                        name: 'DeviceRoomAdd',
                        hidden: true,
                        component: () => import('@/views/patrol/device/room/edit'),
                        meta: {title: '添加', activeMenu: '/device/room', noCache: true},
                    }, {
                        path: 'edit',
                        name: 'DeviceRoomEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/device/room/edit'),
                        meta: {title: '编辑', activeMenu: '/device/room', noCache: true},
                    }
                ],
            },
            {
                path: 'device',
                name: 'DeviceDevice',
                component: () => import('@/views/patrol/device/device'),
                meta: {title: '设备管理', icon: '设备管理', permissions: '设备管理'},
                children: [
                    {
                        path: 'add',
                        name: 'DeviceDeviceAdd',
                        hidden: true,
                        component: () => import('@/views/patrol/device/device/edit'),
                        meta: {title: '添加', activeMenu: '/device/device', noCache: true},
                    }, {
                        path: 'edit',
                        name: 'DeviceDeviceEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/device/device/edit'),
                        meta: {title: '编辑', activeMenu: '/device/device', noCache: true},
                    }, {
                        path: 'cabinet',
                        name: 'DeviceDeviceCabinet',
                        hidden: true,
                        component: () => import('@/views/patrol/device/device/cabinet'),
                        meta: {title: '机柜编辑', activeMenu: '/device/device', noCache: true},
                    }
                ],
            },
        ]
    },
    {
        path: '/stock',
        component: Layout,
        redirect: '/stock/classify',
        meta: {title: '出入库管理', icon: '出入库管理', permissions: '出入库管理'},
        children: [{
            path: 'classify',
            name: 'assetsClassify',
            component: () => import('@/views/patrol/stock/classify'),
            meta: {title: '物品分类', icon: '物品分类', permissions: '物品分类'},
        }, {
            path: 'goods',
            name: 'assetsGoods',
            component: () => import('@/views/patrol/stock/goods'),
            meta: {title: '物品库存', icon: '物品库存', permissions: '物品库存'},
        }, {
            path: 'record',
            name: 'assetsRecord',
            component: () => import('@/views/patrol/stock/record'),
            meta: {title: '出入库记录', icon: '出入库记录', permissions: '出入库记录'},
        }]
    },
    {
        path: '/visitor',
        component: Layout,
        redirect: '/visitor/index',
        meta: {title: '访客管理', icon: '访客管理', permissions: '访客管理'},
        children: [{
            path: 'audit',
            name: 'visitorAudit',
            component: () => import('@/views/patrol/visitor/audit'),
            meta: {title: '访客审批', icon: '访客审批', permissions: '访客审批'},
        }, {
            path: 'regulation',
            name: 'visitorRegulation',
            component: () => import('@/views/patrol/visitor/regulation'),
            meta: {title: '制度管理', icon: '制度管理', permissions: '制度管理'},
        }, {
            path: 'backup',
            name: 'visitorBackup',
            component: () => import('@/views/patrol/visitor/backup'),
            meta: {title: '备案管理', icon: '备案管理', permissions: '备案管理'},
            children: [{
                path: 'add',
                name: 'VisitorBackupAdd',
                hidden: true,
                component: () => import('@/views/patrol/visitor/backup/edit'),
                meta: {title: '添加', activeMenu: '/visitor/backup', noCache: true},
            }, {
                path: 'edit',
                name: 'VisitorBackupEdit',
                hidden: true,
                component: () => import('@/views/patrol/visitor/backup/edit'),
                meta: {title: '编辑', activeMenu: '/visitor/backup', noCache: true},
            }],
        }]
    },
    {
        path: '/system',
        component: Layout,
        redirect: '/system/permissions',
        meta: {title: '系统设置', icon: '系统设置', permissions: '系统设置'},
        children: [
            {
                path: 'permissions',
                name: 'SystemPermissions',
                component: () => import('@/views/patrol/system/permissions'),
                meta: {title: '权限管理', icon: '权限管理', permissions: '权限管理'}
            },
            {
                path: 'role',
                name: 'SystemRole',
                component: () => import('@/views/patrol/system/role'),
                meta: {title: '角色管理', icon: '角色管理', permissions: '角色管理'}
            },
            {
                path: 'dept',
                name: 'SystemDept',
                component: () => import('@/views/patrol/system/dept'),
                meta: {title: '部门管理', icon: '部门管理', permissions: '部门管理'}
            },
            {
                path: 'user',
                name: 'SystemUser',
                component: () => import('@/views/patrol/system/user'),
                meta: {title: '用户管理', icon: '用户管理', permissions: '用户管理'},
                children: [
                    {
                        path: 'add',
                        name: 'SystemUserAdd',
                        hidden: true,
                        component: () => import('@/views/patrol/system/user/edit'),
                        meta: {title: '添加', activeMenu: '/system/user', noCache: true},
                    }, {
                        path: 'edit',
                        name: 'SystemUserEdit',
                        hidden: true,
                        component: () => import('@/views/patrol/system/user/edit'),
                        meta: {title: '编辑', activeMenu: '/system/user', noCache: true},
                    }
                ],
            },
            {
                path: 'comment',
                name: 'SystemUserComment',
                component: () => import('@/views/patrol/system/user-comment'),
                meta: {title: '用户评价', icon: '用户评价', permissions: '用户评价'},
            },
            {
                path: 'log',
                name: 'SystemLog',
                component: () => import('@/views/patrol/system/log'),
                meta: {title: '操作日志管理', icon: '操作日志管理', permissions: '操作日志管理'}
            },
            {
                path: 'login-log',
                name: 'SystemLoginLog',
                component: () => import('@/views/patrol/system/login-log'),
                meta: {title: '登录日志管理', icon: '登录日志管理', permissions: '登录日志管理'}
            },
            {
                path: 'attendance',
                name: 'SystemAttendance',
                component: () => import('@/views/patrol/system/attendance'),
                meta: {title: '考勤管理', icon: '考勤管理', permissions: '考勤管理'},
                children: [
                    {
                        path: 'record',
                        name: 'SystemAttendanceRecord',
                        hidden: true,
                        component: () => import('@/views/patrol/system/attendance/record'),
                        meta: {title: '考勤明细', activeMenu: '/system/attendance', permissions: '考勤管理', noCache: true}
                    }
                ]
            },
            {
                path: 'pue',
                name: 'SystemPue',
                component: () => import('@/views/patrol/system/pue'),
                meta: {title: 'PUE管理', icon: 'PUE管理', permissions: 'PUE管理'}
            },
            {
                path: 'status',
                name: 'SystemStatus',
                component: () => import('@/views/patrol/system/status'),
                meta: {title: '系统状态', icon: '系统状态', permissions: '系统状态'}
            },
            {
                path: 'database-backup',
                name: 'SystemDatabaseBackup',
                component: () => import('@/views/patrol/system/database-backup'),
                meta: {title: '数据备份', icon: '数据备份', permissions: '数据备份'},
                children: [
                    {
                        path: 'add',
                        name: 'SystemDatabaseBackupAdd',
                        hidden: true,
                        component: () => import('@/views/patrol/system/database-backup/edit'),
                        meta: {title: '添加', activeMenu: '/system/database/backup', noCache: true},
                    }
                ],
            }
        ]
    },
    {
        path: '/doc',
        component: Layout,
        redirect: '/doc/api',
        meta: {title: '文档', icon: '文档', permissions: '文档'},
        children: [
            {
                path: 'api',
                name: 'DocApi',
                component: () => import('@/views/patrol/doc/api'),
                meta: {title: '接口文档', icon: '接口文档', permissions: '接口文档'}
            }
        ]
    }
]
