Newer
Older
xc-business-system / src / router / modules / resource.ts
dutingting on 27 Jul 2023 5 KB 资源管理菜单
import type { Route } from '@/global'

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

const routes: Route.recordRaw[] = [
  {
    path: '/person',
    component: Layout,
    redirect: '/person/list',
    name: 'Person',
    meta: {
      title: '人员管理',
      icon: 'ep:key',
      auth: '/resource/person',
    },
    children: [
      {
        path: 'registerList',
        name: 'RegisterList',
        component: () => import('@/views/resource/person/register/list.vue'),
        meta: {
          title: '人员登记列表',
          auth: '/resource/person/register',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'RegisterDetail',
        component: () => import('@/views/resource/person/register/detail.vue'),
        meta: {
          title: '人员登记详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/person/registerList',
        },
      },
      {
        path: 'orderList',
        name: 'OrderList',
        component: () => import('@/views/resource/person/order/list.vue'),
        meta: {
          title: '授权(代理)委托书列表',
          auth: '/resource/person/order',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'OrderDetail',
        component: () => import('@/views/resource/person/order/detail.vue'),
        meta: {
          title: '授权(代理)委托书详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/person/orderList',
        },
      },
      {
        path: 'trainList',
        name: 'TrainList',
        component: () => import('@/views/resource/person/train/list.vue'),
        meta: {
          title: '人员训练登记列表',
          auth: '/resource/person/train',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'TrainDetail',
        component: () => import('@/views/resource/person/train/detail.vue'),
        meta: {
          title: '人员训练登记详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/person/trainList',
        },
      },
      {
        path: 'remindList',
        name: 'RemindList',
        component: () => import('@/views/resource/person/remind/list.vue'),
        meta: {
          title: '证书逾期提醒列表',
          auth: '/resource/person/remind',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'RemindDetail',
        component: () => import('@/views/resource/person/remind/detail.vue'),
        meta: {
          title: '证书逾期提醒详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/person/remindList',
        },
      },
    ],
  },
  {
    path: '/system',
    component: Layout,
    redirect: '/system/sysDocList',
    name: 'System',
    meta: {
      title: '体系文件',
      icon: 'ep:key',
      auth: '/resource/system',
    },
    children: [
      {
        path: 'sysDocList',
        name: 'SysDocList',
        component: () => import('@/views/resource/system/sysDoc/list.vue'),
        meta: {
          title: '体系文件列表',
          auth: '/resource/system/sysDoc',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'SysDocDetail',
        component: () => import('@/views/resource/system/sysDoc/detail.vue'),
        meta: {
          title: '体系文件详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/person/sysDocList',
        },
      },
      {
        path: 'historyDocList',
        name: 'HistoryDocList',
        component: () => import('@/views/resource/system/historyDoc/list.vue'),
        meta: {
          title: '历史文件列表',
          auth: '/resource/system/historyDoc',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'HistoryDocDetail',
        component: () => import('@/views/resource/system/historyDoc/detail.vue'),
        meta: {
          title: '历史文件详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/person/historyDocList',
        },
      },
    ],
  },
  {
    path: '/technology',
    component: Layout,
    redirect: '/technology/methodList',
    name: 'Technology',
    meta: {
      title: '技术文件',
      icon: 'ep:key',
      auth: '/resource/technology',
    },
    children: [
      {
        path: 'methodList',
        name: 'MethodList',
        component: () => import('@/views/resource/technology/method/list.vue'),
        meta: {
          title: '现行测试校准检定方法列表',
          auth: '/resource/technology/method',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'MethodDetail',
        component: () => import('@/views/resource/technology/method/detail.vue'),
        meta: {
          title: '现行测试校准检定方法详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/technology/methodList',
        },
      },
      {
        path: 'dataList',
        name: 'DataList',
        component: () => import('@/views/resource/technology/data/list.vue'),
        meta: {
          title: '计量资料列表',
          auth: '/resource/technology/data',
          icon: 'ep:key',
        },
      },
      {
        path: ':type/:id?',
        name: 'DataDetail',
        component: () => import('@/views/resource/technology/data/detail.vue'),
        meta: {
          title: '计量资料详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/technology/dataList',
        },
      },
    ],
  },
]

export default routes