Newer
Older
xc-business-system / src / router / modules / equipment.ts
dutingting on 12 Sep 2023 10 KB 建标页面搭建、菜单生成
import type { Route } from '@/global'

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

const routes: Route.recordRaw[] = [
  {
    path: '/equipmentInfo',
    component: Layout,
    redirect: '/equipmentInfo/bookList',
    name: 'EquipmentInfo',
    meta: {
      title: '设备信息管理',
      icon: 'ep:key',
      auth: '/equipment/info',
    },
    children: [
      {
        path: 'bookList',
        name: 'EquipmentInfoBookList',
        component: () => import('@/views/equipement/info/book/list.vue'),
        meta: {
          title: '设备台账管理',
          auth: '/equipment/info/book',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'EquipmentInfoBookDetail',
        component: () => import('@/views/equipement/info/book/detail.vue'),
        meta: {
          title: '设备台账管理',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/equipmentInfo/bookList',
        },
      },
      {
        path: 'tableList',
        name: 'EquipmentInfoTableList',
        component: () => import('@/views/equipement/info/table/list.vue'),
        meta: {
          title: '参照标准、工作标准和关键测量设备表列表',
          auth: '/equipment/info/table',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'EquipmentInfoTableDetail',
        component: () => import('@/views/equipement/info/table/detail.vue'),
        meta: {
          title: '参照标准、工作标准和关键测量设备表',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/equipmentInfo/tableList',
        },
      },
      {
        path: 'remindList',
        name: 'EquipmentInfoRemindList',
        component: () => import('@/views/equipement/info/remind/list.vue'),
        meta: {
          title: '到期提醒列表',
          auth: '/equipment/info/remind',
          icon: 'ep:key',
        },
      },
      // {
      //   path: ':type/:id?',
      //   name: 'EquipmentInfoRemindDetail',
      //   component: () => import('@/views/equipement/info/remind/detail.vue'),
      //   meta: {
      //     title: '到期提醒',
      //     icon: 'ep:key',
      //     sidebar: false,
      //     breadcrumb: true,
      //     activeMenu: '/equipmentInfo/remindList',
      //   },
      // },
    ],
  },
  {
    path: '/stateMaintenance',
    component: Layout,
    redirect: '/stateMaintenance/unseal',
    name: 'StateMaintenance',
    meta: {
      title: '设备状态维护',
      icon: 'ep:key',
      auth: '/equipment/stateMaintenance',
    },
    children: [
      {
        path: 'unsealList',
        name: 'UnsealList',
        component: () => import('@/views/equipement/stateMaintenance/unseal/list.vue'),
        meta: {
          title: '设备启封申请',
          auth: '/equipment/stateMaintenance/unseal',
          icon: 'ep:key',
        },
      },
      {
        path: 'unseal/:type/:id?',
        name: 'UnsealDetail',
        component: () => import('@/views/equipement/stateMaintenance/unseal/edit.vue'),
        meta: {
          title: '设备启封申请',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/stateMaintenance/unsealList',
        },
      },
      {
        path: 'sealList',
        name: 'SealList',
        component: () => import('@/views/equipement/stateMaintenance/seal/list.vue'),
        meta: {
          title: '设备封存申请',
          auth: '/equipment/stateMaintenance/seal',
          icon: 'ep:key',
        },
      },
      {
        path: 'seal/:type/:id?',
        name: 'SealDetail',
        component: () => import('@/views/equipement/stateMaintenance/seal/edit.vue'),
        meta: {
          title: '设备封存申请',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/stateMaintenance/sealList',
        },
      },
      {
        path: 'banList',
        name: 'BanList',
        component: () => import('@/views/equipement/stateMaintenance/ban/list.vue'),
        meta: {
          title: '设备禁用申请',
          auth: '/equipment/stateMaintenance/ban',
          icon: 'ep:key',
        },
      },
      {
        path: 'ban/:type/:id?',
        name: 'BanDetail',
        component: () => import('@/views/equipement/stateMaintenance/ban/edit.vue'),
        meta: {
          title: '设备禁用申请',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/stateMaintenance/banList',
        },
      },
      {
        path: 'scrapList',
        name: 'ScrapList',
        component: () => import('@/views/equipement/stateMaintenance/scrap/list.vue'),
        meta: {
          title: '设备报废申请',
          auth: '/equipment/stateMaintenance/scrap',
          icon: 'ep:key',
        },
      },
      {
        path: 'scrap/:type/:id?',
        name: 'ScrapDetail',
        component: () => import('@/views/equipement/stateMaintenance/scrap/edit.vue'),
        meta: {
          title: '设备报废申请',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/stateMaintenance/scrapList',
        },
      },
    ],
  },
  {
    path: '/standard',
    component: Layout,
    redirect: '/standard/bookInfoList',
    name: 'Standard',
    meta: {
      title: '标准装置管理',
      icon: 'ep:key',
      auth: '/standard',
    },
    children: [
      {
        path: 'bookInfoList',
        name: 'BookInfoList',
        component: () => import('@/views/equipement/standard/book/list.vue'),
        meta: {
          title: '标准装置台账信息列表',
          auth: '/standard/bookInfo',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'StandardBookInfoList',
        component: () => import('@/views/equipement/standard/book/detail.vue'),
        meta: {
          title: '标准装置台账信息',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/standard/bookInfoList',
        },
      },
      {
        path: 'standardRemindList',
        name: 'StandardRemindList',
        component: () => import('@/views/equipement/standard/remind/list.vue'),
        meta: {
          title: '到期提醒',
          auth: '/standard/remind',
          icon: 'ep:key',
        },
      },
      {
        path: 'checkRecordList',
        name: 'CheckRecordList',
        component: () => import('@/views/equipement/standard/checkRecord/list.vue'),
        meta: {
          title: '核查记录管理',
          auth: '/standard/checkRecord',
          icon: 'ep:key',
        },
      },
      {
        path: '/checkRecord/:type/:id?',
        name: 'CheckRecordDetail',
        component: () => import('@/views/equipement/standard/checkRecord/edit.vue'),
        meta: {
          title: '核查记录管理',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/standard/checkRecordList',
        },
      },
      {
        path: 'standardBuildList',
        name: 'StandardBuildList',
        component: () => import('@/views/equipement/standard/build/list.vue'),
        meta: {
          title: '建标管理',
          auth: '/standard/build',
          icon: 'ep:key',
        },
      },
      {
        path: '/build/:type/:id?',
        name: 'StandardBuildEdit',
        component: () => import('@/views/equipement/standard/build/edit.vue'),
        meta: {
          title: '建标管理',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/standard/standardBuildList',
        },
      },
      {
        path: '/buildDoc/:type/:id?',
        name: 'StandardBuildDetail',
        component: () => import('@/views/equipement/standard/build/detail.vue'),
        meta: {
          title: '建标管理',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/standard/standardBuildList',
        },
      },
    ],
  },
  {
    path: '/standardStateMaintenance',
    component: Layout,
    redirect: '/standardStateMaintenance/changeList',
    name: 'StandardStateMaintenance',
    meta: {
      title: '标准装置状态维护',
      icon: 'ep:key',
      auth: '/standard/stateMaintenance',
    },
    children: [
      {
        path: 'changeList',
        name: 'ChangeList',
        component: () => import('@/views/equipement/StandardStateMaintenance/change/list.vue'),
        meta: {
          title: '更换申请',
          auth: '/standard/change',
          icon: 'ep:key',
        },
      },
      {
        path: '/change/:type/:id?',
        name: 'ChangeDetail',
        component: () => import('@/views/equipement/StandardStateMaintenance/change/detail.vue'),
        meta: {
          title: '更换申请',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/StandardStateMaintenance/changeList',
        },
      },
      {
        path: 'reviewList',
        name: 'ReviewList',
        component: () => import('@/views/equipement/StandardStateMaintenance/review/list.vue'),
        meta: {
          title: '复查申请',
          auth: '/standard/review',
          icon: 'ep:key',
        },
      },
      {
        path: '/review/:type/:id?',
        name: 'ReviewDetail',
        component: () => import('@/views/equipement/StandardStateMaintenance/review/detail.vue'),
        meta: {
          title: '复查申请',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/StandardStateMaintenance/reviewList',
        },
      },
      {
        path: 'revocationList',
        name: 'RevocationList',
        component: () => import('@/views/equipement/StandardStateMaintenance/revocation/list.vue'),
        meta: {
          title: '撤销申请',
          auth: '/standard/revocation',
          icon: 'ep:key',
        },
      },
      {
        path: '/revocation/:type/:id?',
        name: 'RevocationDetail',
        component: () => import('@/views/equipement/StandardStateMaintenance/revocation/detail.vue'),
        meta: {
          title: '撤销申请',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/StandardStateMaintenance/revocationList',
        },
      },
    ],
  },
]

export default routes