/* Layout */
import Layout from '../../views/layout/Layout'

export const accessRouters = [
  {
    path: '/acsPerm',
    component: Layout,
    redirect: '/acsPermission',
    name: 'AcsPerm',
    meta: {
      title: '门禁授权',
      icon: 'icon-config', // 图标
      permission: ['/accessPermission']// 权限名称
    },
    children: [
      {
        path: '/acsPermission',
        name: 'AcsPermission',
        component: () => import('@/views/accessPermission/listDoorPermission'),
        meta: { title: '门禁授权', icon: 'function', permission: ['/accessPermission'] }
      },
      {
        path: '/listStaffPermission',
        name: 'ListStaffPermission',
        hidden: true,
        component: () => import('@/views/accessPermission/listStaffPermission'),
        meta: { title: '员工授权', icon: 'function', permission: ['/acsPermission/listStaffPerm'] }
      },
      {
        path: '/listVisitorPermission',
        name: 'ListVisitorPermission',
        hidden: true,
        component: () => import('@/views/accessPermission/listVisitorPermission'),
        meta: { title: '访客授权', icon: 'function', permission: ['/acsPermission/listVisitorPerm'] }
      }
    ]
  },
  {
    path: '/doorManage',
    component: Layout,
    redirect: '/door',
    name: 'DoorManage',
    meta: {
      title: '门禁管理',
      icon: 'icon-config', // 图标
      permission: ['/door']// 权限名称
    },
    children: [
      {
        path: '/listDoor',
        name: 'ListDoor',
        component: () => import('@/views/doorManage/listDoor'),
        meta: { title: '门禁列表', icon: 'function', permission: ['/door/listPage'] }
      },
      {
        path: '/doorControl',
        name: 'DoorControl',
        component: () => import('@/views/doorManage/listDoorControl'),
        meta: { title: '门禁控制', icon: 'function', permission: ['/door/control'] }
      },
      {
        path: '/doorGroup',
        name: 'DoorGroup',
        component: () => import('@/views/doorManage/listGroup'),
        meta: { title: '门禁组别', icon: '', permission: ['/doorGroup'] }
      }
    ]
  },
  {
    path: '/personManage',
    component: Layout,
    redirect: '/staff',
    name: 'PersonManage',
    meta: {
      title: '人员管理',
      icon: 'icon-config', // 图标
      permission: ['/person']// 权限名称
    },
    children: [
      {
        path: '/staff',
        name: 'Staff',
        component: () => import('@/views/memberManage/listStaff'),
        meta: { title: '员工管理', icon: '', permission: ['/staff'] }
      },
      {
        path: '/visitor',
        name: 'Visitor',
        component: () => import('@/views/memberManage/listVisitor'),
        meta: { title: '访客管理', icon: '', permission: ['/visitor'] }
      },
      {
        path: '/personGroup',
        name: 'PersonGroup',
        component: () => import('@/views/memberManage/listGroup'),
        meta: { title: '人员组别', icon: '', permission: ['/personGroup'] }
      },
      {
        path: '/addStaff',
        name: 'AddStaff',
        hidden: true,
        // component: () => import('@/views/memberManage/addPersonIris'),
        component: () => import('@/views/memberManage/addAndUpdatePerson'),
        meta: { title: '新增员工', icon: '', permission: ['/staff/add'] }
      },
      {
        path: '/updateStaff',
        name: 'UpdateStaff',
        hidden: true,
        // component: () => import('@/views/memberManage/addPerson'),
        component: () => import('@/views/memberManage/addAndUpdatePerson'),
        meta: { title: '编辑员工', icon: '', permission: ['/staff/update'] }
      },
      {
        path: '/addIris',
        name: 'AddIris',
        hidden: true,
        component: () => import('@/views/memberManage/addIris'),
        meta: { title: '采集虹膜', icon: '', permission: ['/iris'] }
      },
      {
        path: '/addVisitor',
        name: 'AddVisiotr',
        hidden: true,
        // component: () => import('@/views/memberManage/addPersonIris'),
        component: () => import('@/views/memberManage/addAndUpdatePerson'),
        meta: { title: '新增访客', icon: '', permission: ['/visitor/add'] }
      },
      {
        path: '/updateVisitor',
        name: 'UpdateVisitor',
        hidden: true,
        // component: () => import('@/views/memberManage/addPerson'),
        component: () => import('@/views/memberManage/addAndUpdatePerson'),
        meta: { title: '编辑访客', icon: '', permission: ['/device'] }
      }]
  },
  {
    path: 'query',
    component: Layout,
    redirect: '/querystaff',
    name: 'Query',
    meta: {
      title: '数据查询',
      // icon: 'icon-config', // 图标
      permission: ['/query']// 权限名称
    },
    children: [
      {
        path: '/querystaff',
        component: () => import('@/views/query/listRecord'),
        name: 'StaffQuery',
        meta: { title: '员工数据查询', permission: ['/query/staff'] }

      }
      // ,{
      //   path: '/queryvisitor',
      //   component: () => import('@/views/query/queryVisitor'), // Parent router-view
      //   name: 'VisitorQuery',
      //   meta: { title: '访客数据查询', permission: ['/query/visitor'] }
      //
      // }
    ]
  },
  {
    path: '/acsStrategy',
    component: Layout,
    redirect: '/strategy',
    name: 'AcsStrategy',
    meta: {
      title: '授权时段',
      icon: 'icon-config', // 图标
      permission: ['/acs_strategy']// 权限名称
    },
    children: [
      {
        path: '/strategy',
        name: 'Strategy',
        component: () => import('@/views/accessStrategy/listStrategy'),
        meta: { title: '授权时段', icon: 'function', permission: ['/acs_strategy'] }
      }
    ]
  },
  {
    path: 'DeviceManage',
    component: Layout,
    redirect: '/device',
    name: 'DeviceManage',
    meta: {
      title: '设备管理',
      icon: 'icon-config', // 图标
      permission: ['/device']// 权限名称
    },
    children: [{
      path: '/device',
      name: 'Device',
      component: () => import('@/views/deviceManage/listDevice'),
      meta: { title: '设备管理', icon: 'dashboard', permission: ['/device'] }
    }]
  },
  {
    path: 'dataStatics',
    component: Layout,
    redirect: '/statics',
    name: 'DataStatics',
    meta: {
      title: '数据统计',
      icon: 'icon-config', // 图标
      permission: ['/statistics']// 权限名称
    },
    children: [
      {
        path: '/statics',
        component: () => import('@/views/statistics/statistics'), // Parent router-view
        name: 'StaffQuery',
        meta: { title: '数据统计', permission: ['/statistics'] }

      }]
  }
]
