/* Layout */
import Layout from '@/layout/Layout'
export const sanitationRouters = [
  {
    path: '/sanitation',
    name: 'comment',
    redirect: '/stafflist',
    hidden: true,
    meta: {
      title: '环卫子系统',
      permission: ['/sanitation'],
      isSys: true
    }
  },
  {
    path: '/staff',
    component: Layout,
    redirect: '/stafflist',
    name: 'Staff',
    alwaysShow: true,
    meta: {
      title: '人员管理',
      icon: 'icon-config', // 图标
      sys: '/sanitation',
      permission: ['/sanitation/staff']
    },
    children: [
      {
        path: '/stafflist',
        name: 'StaffList',
        component: () => import('@/views/staffManage/staffList'),
        meta: { title: '人员列表', icon: '', permission: ['/sanitation/staff/listPage'] }
      },
      {
        path: '/attendancelist',
        name: 'AttendanceList',
        component: () => import('@/views/staffManage/attendanceList'),
        meta: { title: '出勤记录', icon: '', permission: ['/sanitation/staff/attendanceList'] }
      }
    ]
  },
  {
    path: '/device',
    component: Layout,
    redirect: '/wastbinlist',
    name: 'Device',
    alwaysShow: true,
    permission: ['/sanitation/device'],
    meta: {
      sys: '/sanitation',
      title: '环卫设施台账',
      icon: 'icon-wastebin', // 图标
      permission: ['/sanitation/device']
    },
    children: [
      {
        path: '/wastbinlist',
        name: 'WastebinList',
        component: () => import('@/views/wastebinManage/wastebinList'),
        meta: { title: '垃圾桶管理', icon: '', permission: ['/sanitation/wastebin/list'] }
      },
      {
        path: '/toiletlist',
        name: 'ToiletList',
        component: () => import('@/views/toiletManage/toiletList'),
        meta: { title: '公厕管理', icon: '', permission: ['/sanitation/toilet/list'] }
      },
      {
        path: '/transferstation',
        name: 'TransferstationList',
        component: () => import('@/views/transferstationManage/transferstationList'),
        meta: { title: '垃圾中转站管理', icon: '', permission: ['/sanitation/transferstation/list'] }
      },
      {
        path: '/carlist',
        name: 'CarList',
        component: () => import('@/views/carManage/carList'),
        meta: { title: '环卫车辆管理', icon: '', permission: ['/sanitation/car/list'] }
      }
    ]
  },
  {
    path: '/route',
    component: Layout,
    redirect: '/route/waste',
    name: 'Route',
    alwaysShow: true,
    permission: ['/sanitation/route'],
    meta: {
      sys: '/sanitation',
      title: '路线管理',
      icon: 'icon-route', // 图标
      permission: ['/sanitation/route']
    },
    children: [
      {
        path: '/route/waste',
        name: 'WastebinJobRoute',
        component: () => import('@/views/routeManage/listRoute'),
        meta: { title: '垃圾转运作业路线', icon: '', permission: ['/sanitation/route/waste'] }
      },
      {
        path: '/route/clean',
        name: 'CleanJobRoute',
        component: () => import('@/views/routeManage/listRoute'),
        meta: { title: '路面清扫作业路线', icon: '', permission: ['/sanitation/route/clean'] }
      },
      {
        path: '/route/add/waste',
        name: 'AddWasteBinRoute',
        component: () => import('@/views/routeManage/addRoute'),
        hidden: true,
        meta: { title: '新增垃圾转运作业路线', icon: '', permission: ['/sanitation/route/waste/add'] }
      },
      {
        path: '/route/add/clean',
        name: 'AddCleanRoute',
        component: () => import('@/views/routeManage/addRoute'),
        hidden: true,
        meta: { title: '新增路面清扫作业路线', icon: '', permission: ['/sanitation/route/clean/add'] }
      },
      {
        path: '/route/edit/waste',
        name: 'EditWasteBinRoute',
        component: () => import('@/views/routeManage/editRoute'),
        hidden: true,
        meta: { title: '编辑垃圾转运作业路线', icon: '', permission: ['/sanitation/route/waste/update'] }
      },
      {
        path: '/route/edit/clean',
        name: 'EditCleanRoute',
        component: () => import('@/views/routeManage/editRoute'),
        hidden: true,
        meta: { title: '编辑路面清扫作业路线', icon: '', permission: ['/sanitation/route/clean/update'] }
      },
      {
        path: '/route/detail/waste',
        name: 'DetailWasteBinRoute',
        component: () => import('@/views/routeManage/detailRoute'),
        hidden: true,
        meta: { title: '垃圾转运作业路线详情', icon: '', permission: ['/sanitation/route/detail/waste'] }
      },
      {
        path: '/route/detail/clean',
        name: 'DetailCleanRoute',
        component: () => import('@/views/routeManage/detailRoute'),
        hidden: true,
        meta: { title: '路面清扫作业路线详情', icon: '', permission: ['/sanitation/route/detail/clean'] }
      }
    ]
  },
  {
    path: '/job',
    component: Layout,
    redirect: '/jobRecord/wastebin',
    name: 'Job',
    alwaysShow: true,
    permission: ['/sanitation/job'],
    meta: {
      sys: '/sanitation',
      title: '作业管理',
      icon: 'task' // 图标
    },
    children: [
      {
        path: '/jobRecord/wastebin',
        name: 'WastebinJob',
        component: () => import('@/views/jobRecords/jobRecords'),
        meta: { title: '垃圾转运作业记录', icon: '', permission: ['/sanitation/job/wastebin'] }
      },
      {
        path: '/jobRecord/clean',
        name: 'CleanJob',
        component: () => import('@/views/jobRecords/jobRecords'),
        meta: { title: '路面清扫作业记录', icon: '', permission: ['/sanitation/job/clean'] }
      },
      {
        path: '/toiletJob/clean',
        name: 'ToiletClean',
        component: () => import('@/views/toiletClean/toiletCleanList'),
        meta: { title: '公厕保洁作业记录', icon: '', permission: ['/sanitation/toiletJob/clean'] }
      }
    ]
  },
  {
    path: '/assessment',
    component: Layout,
    redirect: '/staff/assessment',
    name: 'Assessment',
    alwaysShow: true,
    meta: {
      sys: '/sanitation',
      title: '考核统计',
      icon: 'icon-config', // 图标
      permission: ['/sanitation/assessment']
    },
    children: [
      {
        path: '/assessment/staff',
        name: 'StaffAssessment',
        component: () => import('@/views/assessment/staffAssessment'),
        meta: { title: '人员出勤统计', icon: '', permission: ['/sanitation/assessment/staff'] }
      },
      {
        path: '/assesment/wastebin',
        name: 'WastebinJo',
        component: () => import('@/views/assessment/wasteAssessment'),
        meta: { title: '垃圾转运作业统计', icon: '', permission: ['/sanitation/assesment/wastebin'] }
      },
      {
        path: '/assesment/clean',
        name: 'CleanJobRoute',
        component: () => import('@/views/assessment/cleanAssessment'),
        meta: { title: '路面清扫作业统计', icon: '', permission: ['/sanitation/assesment/clean'] }
      },
      {
        path: '/assesment/toilet',
        name: 'ToiletJobRoute',
        component: () => import('@/views/assessment/toiletAssessment'),
        meta: { title: '公厕保洁作业统计', icon: '', permission: ['/sanitation/assesment/toilet'] }
      }
    ]
  },
  {
    path: '/view',
    component: () => import('@/views/overview/overview'),
    name: 'view',
    redirect: '/overview',
    permission: ['/sanitation/overview'],
    meta: {
      sys: '/sanitation',
      title: '总览',
      icon: 'icon-config' // 图标
    },
    children: [
      {
        path: '/overview',
        name: 'Overview',
        component: () => import('@/views/overview/overview'),
        meta: { title: '总览', icon: 'dashboard', permission: ['/sanitation/overview'] }
      }
    ]
  }]
