/* 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: '/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: 'query',
    component: Layout,
    redirect: '/querystaff',
    name: 'Query',
    alwaysShow: true,
    meta: {
      title: '数据查询',
      // icon: 'icon-config', // 图标
      permission: ['/query']// 权限名称
    },
    children: [
      {
        path: '/querystaff',
        component: () => import('@/views/query/queryStaff'), // Parent router-view
        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: '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'] }

      }]
  }
]
