import layoutHeaderAside from '@/layout/header-aside'

const meta = { auth: true }

const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

export default {
  path: '/device_management',
  component: layoutHeaderAside,
  children: (pre => [
    {
      path: 'index',
      name: `${pre}index`,
      meta: { ...meta, title: '设备管理', root: '/device_management' },
      component: _import('system/function/module-index')
    },
    {
      path: 'device_model/device_category',
      name: `${pre}equipment_model-equipment_category`,
      meta: { ...meta, cache: true, title: '设备类别' },
      component: _import('equipment-management/equipment-model/equipment-category')
    },
    {
      path: 'device_model/device_management',
      name: `${pre}equipment_model-equipment_registry`,
      meta: { ...meta, cache: true, title: '设备信息' },
      component: _import('equipment-management/equipment-model/equipment-registry')
    },
    {
      path: 'device_check/device_check_items',
      name: `${pre}device_check-device_check_items`,
      meta: { ...meta, cache: true, title: '设备点检项目' },
      component: _import('equipment-management/inspection-management/inspection-items')
    },
    {
      path: 'device_check/device_check_record',
      name: `${pre}device_check-device_check_record`,
      meta: { ...meta, cache: true, title: '设备点检记录' },
      component: _import('equipment-management/inspection-management/inspection-records')
    },
    {
      path: 'device_check/device_check_items_log',
      name: `${pre}device_check-device_check_items_log`,
      meta: { ...meta, cache: true, title: '设备点检日志' },
      component: _import('equipment-management/inspection-management/inspection-logs')
    },
    {
      path: 'device_maintain/device_maintain_items',
      name: `${pre}device_maintain-device_maintain_items`,
      meta: { ...meta, cache: true, title: '设备保养项目' },
      component: _import('equipment-management/maintenance-management/maintenance-items')
    },
    {
      path: 'device_maintain/device_maintain_items_details',
      name: `${pre}device_maintain-device_maintain_items_details`,
      meta: { ...meta, cache: true, title: '设备保养详情' },
      component: _import('equipment-management/maintenance-management/maintenance-details')
    },
    {
      path: 'device_maintain/device_maintain_items_log',
      name: `${pre}device_maintain-device_maintain_items_log`,
      meta: { ...meta, cache: true, title: '设备保养日志' },
      component: _import('equipment-management/maintenance-management/maintenance-logs')
    },
    {
      path: 'device_repair/device_repair_management',
      name: `${pre}device_repair-device_repair_management`,
      meta: { ...meta, cache: true, title: '设备维修管理' },
      component: _import('equipment-management/repair-management/repair-management')
    },
    {
      path: 'device_repair/device_repair_log',
      name: `${pre}device_repair-device_repair_log`,
      meta: { ...meta, cache: true, title: '设备维修日志' },
      component: _import('equipment-management/repair-management/repair-logs')
    },
    {
      path: 'device_consumables/device_consumables_category',
      name: `${pre}device_consumables-device_consumables_category`,
      meta: { ...meta, cache: true, title: '设备损耗品类别' },
      component: _import('equipment-management/consumables-management/consumables-category')
    },
    {
      path: 'device_consumables/device_consumables_items',
      name: `${pre}device_consumables-device_consumables_items`,
      meta: { ...meta, cache: true, title: '设备损耗品项目' },
      component: _import('equipment-management/consumables-management/consumables-items')
    },
    {
      path: 'device_consumables/device_consumables_lifetime_management',
      name: `${pre}device_consumables-device_consumables_lifetime_management`,
      meta: { ...meta, cache: true, title: '设备损耗品寿命管理' },
      component: _import('equipment-management/consumables-management/consumables-lifecycle')
    },
    {
      path: 'device_consumables/device_consumables_replace_log',
      name: `${pre}device_consumables-device_consumables_replace_log`,
      meta: { ...meta, cache: true, title: '设备损耗品更换日志' },
      component: _import('equipment-management/consumables-management/replacement-logs')
    }
  ])('device_management-')
}
