// 测量设备
import type { Route } from '@/global'

const Layout = () => import('@/layouts/index.vue')

const routes: Route.recordRaw[] = [
  {
    path: '/device',
    component: Layout,
    redirect: '/device/bench',
    name: 'DBench',
    meta: {
      title: '工作台',
      icon: 'ep:key',
      auth: '/device/bench',
    },
    children: [
      {
        path: '/device/bench',
        name: 'DeviceBench',
        component: () => import('@/views/device/bench/deviceBench.vue'),
        meta: {
          title: '工作台',
          auth: '/device/bench',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/device',
        },
      },
    ],
  },
  {
    path: '/standingBook',
    component: Layout,
    redirect: '/standingBook/measureDevice',
    name: 'standingBook',
    meta: {
      title: '设备台账',
      icon: 'ep:key',
      auth: '/device/standingBook',
    },
    children: [
      {
        path: 'measureDevice',
        name: 'measureDevice',
        component: () => import('@/views/device/standingBook/measureDevice.vue'),
        meta: {
          title: '测量设备',
          icon: 'ep:key',
          auth: '/device/measureDevice',
        },
      },
      {
        path: 'adjustDevice',
        name: 'adjustDevice',
        component: () => import('@/views/device/standingBook/adjustDevice.vue'),
        meta: {
          title: '校准/检定设备',
          icon: 'ep:key',
          auth: '/device/adjustDevice',
        },
      },
      {
        path: 'standardMatchDevice',
        name: 'standardMatchDevice',
        component: () => import('@/views/device/standingBook/standardMatchDevice.vue'),
        meta: {
          title: '标准配套设备',
          icon: 'ep:key',
          auth: '/device/standardMatchDevice',
        },
      },
      {
        path: 'measureTool',
        name: 'measureTool',
        component: () => import('@/views/device/standingBook/measureTool.vue'),
        meta: {
          title: '测量工装',
          icon: 'ep:key',
          auth: '/device/measureTool',
        },
      },
      {
        path: 'fixedAssets',
        name: 'fixedAssets',
        component: () => import('@/views/device/standingBook/fixedAssets.vue'),
        meta: {
          title: '固定资产',
          icon: 'ep:key',
          auth: '/device/fixedAssets',
        },
      },
    ],
  },
  {
    path: '/standard',
    component: Layout,
    redirect: '/standard/list',
    name: 'Standard',
    meta: {
      title: '标准装置',
      icon: 'ep:key',
      auth: '/standardEquipment',
    },
    children: [
      {
        path: 'list',
        name: 'standardList',
        component: () => import('@/views/device/standardEquipment/standardList.vue'),
        meta: {
          title: '标准装置列表',
          icon: 'ep:key',
          auth: '/standard/list',
        },
      },
      {
        path: 'expirationRemind',
        name: 'expirationRemind',
        component: () => import('@/views/device/standardEquipment/expirationRemind.vue'),
        meta: {
          title: '到期提醒',
          icon: 'ep:key',
          auth: '/standard/expirationRemind',
        },
      },
      {
        path: 'changeApply',
        name: 'changeApply',
        component: () => import('@/views/device/standardEquipment/changeApply.vue'),
        meta: {
          title: '更换申请',
          icon: 'ep:key',
          auth: '/standard/changeApply',
        },
      },
      {
        path: 'pauseApply',
        name: 'pauseApply',
        component: () => import('@/views/device/standardEquipment/pauseApply.vue'),
        meta: {
          title: '暂停申请',
          icon: 'ep:key',
          auth: '/standard/pauseApply',
        },
      },
      {
        path: 'cancelApply',
        name: 'cancelApply',
        component: () => import('@/views/device/standardEquipment/cancelApply.vue'),
        meta: {
          title: '撤销申请',
          icon: 'ep:key',
          auth: '/standard/cancelApply',
        },
      },
      {
        path: 'resumeApply',
        name: 'resumeApply',
        component: () => import('@/views/device/standardEquipment/resumeApply.vue'),
        meta: {
          title: '恢复申请',
          icon: 'ep:key',
          auth: '/standard/resumeApply',
        },
      },
      {
        path: 'checkApply',
        name: 'checkApply',
        component: () => import('@/views/device/standardEquipment/checkApply.vue'),
        meta: {
          title: '复查申请',
          icon: 'ep:key',
          auth: '/standard/checkApply',
        },
      },
    ],
  },
  {
    path: '/stateManage',
    component: Layout,
    redirect: '/stateManage/unusedApply',
    name: 'stateManage',
    meta: {
      title: '状态管理',
      icon: 'ep:key',
      auth: '/device/stateManage',
    },
    children: [
      {
        path: 'unusedApply',
        name: 'unusedApply',
        component: () => import('@/views/device/stateManage/unusedApply.vue'),
        meta: {
          title: '设备闲置申请',
          icon: 'ep:key',
          auth: '/device/unusedApply',
        },
      },
      {
        path: 'sealupApply',
        name: 'sealupApply',
        component: () => import('@/views/device/stateManage/sealupApply.vue'),
        meta: {
          title: '设备封存申请',
          icon: 'ep:key',
          auth: '/device/sealupApply',
        },
      },
      {
        path: 'openApply',
        name: 'openApply',
        component: () => import('@/views/device/stateManage/openApply.vue'),
        meta: {
          title: '设备启封申请',
          icon: 'ep:key',
          auth: '/device/openApply',
        },
      },
      {
        path: 'scrapApply',
        name: 'scrapApply',
        component: () => import('@/views/device/stateManage/scrapApply.vue'),
        meta: {
          title: '设备报废申请',
          icon: 'ep:key',
          auth: '/device/scrapApply',
        },
      },
      {
        path: 'handleApply',
        name: 'handleApply',
        component: () => import('@/views/device/stateManage/handleApply.vue'),
        meta: {
          title: '设备处置申请',
          icon: 'ep:key',
          auth: '/device/handleApply',
        },
      },
    ],
  },
  {
    path: '/maintenance',
    component: Layout,
    redirect: '/maintenance/maintenanceList',
    name: 'MaintenanceManage',
    meta: {
      title: '设备维护',
      icon: 'ep:key',
      auth: '/device/maintenance',
    },
    children: [
      {
        path: 'maintenanceList',
        name: 'maintenanceList',
        component: () => import('@/views/device/deviceMaintenance/maintenanceList.vue'),
        meta: {
          title: '设备维护列表',
          icon: 'ep:key',
          auth: '/device/maintenanceList',
        },
      },
      {
        path: 'maintenanceCheckList',
        name: 'maintenanceCheckList',
        component: () => import('@/views/device/deviceMaintenance/maintenanceCheckList.vue'),
        meta: {
          title: '设备检修保养验收单',
          icon: 'ep:key',
          auth: '/device/maintenance/checkList',
        },
      },
      {
        path: 'manageCheckList',
        name: 'manageCheckList',
        component: () => import('@/views/device/deviceMaintenance/manageCheckList.vue'),
        meta: {
          title: '设备管理点检查表',
          icon: 'ep:key',
          auth: '/device/manage/checkList',
        },
      },
    ],
  },
]

export default routes
