Newer
Older
xc-metering-front / src / router / modules / tested.ts
liyaguang on 25 Jul 2023 26 KB feat(*): 基础路由菜单搭建
import type { Route } from '@/global'

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

const routes: Route.recordRaw[] = [
  // 首页看板
  {
    path: '/testeddashboard',
    component: Layout,
    redirect: '/tdashboard',
    name: 'TDashboard',
    meta: {
      title: '首页看板',
      icon: 'ep:key',
      auth: '/tested/dashboard',
    },
    children: [
      {
        path: '/tdashboard',
        component: () => import('@/views/tested/dashboard/index.vue'),
        name: 'TDashboardPage',
        meta: {
          title: '首页看板',
          icon: 'ep:key',
          auth: '/tested/dashboard',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/testeddashboard',
        },
      },
    ],
  },
  // 计量计划
  {
    path: '/meteringplan',
    component: Layout,
    redirect: '/planlist',
    name: 'MeteringPlan',
    meta: {
      title: '计量计划',
      icon: 'ep:key',
      auth: '/tested/plan',
    },
    children: [
      {
        path: '/planlist',
        component: Layout,
        redirect: '/plan',
        name: 'PlanList',
        meta: {
          title: '计量计划',
          icon: 'ep:key',
          auth: '/tested/metering/plan',
        },
        children: [
          {
            path: '/plan',
            name: 'PlanPage',
            component: () => import('@/views/tested/MeasurementPlan/plan/index.vue'),
            meta: {
              title: '计量计划',
              auth: '/tested/metering/plan',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/planlist',
            },
          },
        ],
      },
      {
        path: '/meteringboard',
        component: Layout,
        redirect: '/boardpage',
        name: 'MeteringBoard',
        meta: {
          title: '业务看板',
          icon: 'ep:key',
          auth: '/tested/metering/board',
        },
        children: [
          {
            path: '/boardpage',
            name: 'BoardPage',
            component: () => import('@/views/tested/MeasurementPlan/board/index.vue'),
            meta: {
              title: '业务看板',
              auth: '/tested/metering/board',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/meteringboard',
            },
          },
        ],
      },
      {
        path: '/meteringealy',
        component: Layout,
        redirect: '/ealypage',
        name: 'MeteringEaly',
        meta: {
          title: '提前送检申请',
          icon: 'ep:key',
          auth: '/tested/metering/ealy',
        },
        children: [
          {
            path: '/ealypage',
            name: 'EalyPage',
            component: () => import('@/views/tested/MeasurementPlan/ealy/index.vue'),
            meta: {
              title: '提前送检申请',
              auth: '/tested/metering/ealy',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/meteringealy',
            },
          },
        ],
      },
      {
        path: '/meteringdelay',
        component: Layout,
        redirect: '/delaypage',
        name: 'MeteringDelay',
        meta: {
          title: '延迟送检申请',
          icon: 'ep:key',
          auth: '/tested/metering/delay',
        },
        children: [
          {
            path: '/delaypage',
            name: 'DelayPage',
            component: () => import('@/views/tested/MeasurementPlan/delay/index.vue'),
            meta: {
              title: '延迟送检申请',
              auth: '/tested/metering/delay',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/meteringdelay',
            },
          },
        ],
      },
      {
        path: '/meteringcurator',
        component: Layout,
        redirect: '/curatorpage',
        name: 'MeteringCurator',
        meta: {
          title: '负责人送检通知',
          icon: 'ep:key',
          auth: '/tested/metering/curator',
        },
        children: [
          {
            path: '/curatorpage',
            name: 'CuratorPage',
            component: () => import('@/views/tested/MeasurementPlan/curator/index.vue'),
            meta: {
              title: '负责人送检通知',
              auth: '/tested/metering/curator',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/meteringcurator',
            },
          },
        ],
      },
      {
        path: '/meteringdept',
        component: Layout,
        redirect: '/deptpage',
        name: 'MeteringDept',
        meta: {
          title: '部门送检通知',
          icon: 'ep:key',
          auth: '/tested/metering/dept',
        },
        children: [
          {
            path: '/deptpage',
            name: 'DeptPage',
            component: () => import('@/views/tested/MeasurementPlan/dept/index.vue'),
            meta: {
              title: '部门送检通知',
              auth: '/tested/metering/dept',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/meteringdept',
            },
          },
        ],
      },
      {
        path: '/meteringtask',
        component: Layout,
        redirect: '/taskpage',
        name: 'MeteringTask',
        meta: {
          title: '任务单管理',
          icon: 'ep:key',
          auth: '/tested/metering/task',
        },
        children: [
          {
            path: '/taskpage',
            name: 'TaskPage',
            component: () => import('@/views/tested/MeasurementPlan/task/index.vue'),
            meta: {
              title: '任务单管理',
              auth: '/tested/metering/task',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/meteringtask',
            },
          },
        ],
      },
    ],
  },
  // 设备台账
  {
    path: '/meteringdevice',
    component: Layout,
    redirect: '/devicelist',
    name: 'MeteringDevice',
    meta: {
      title: '设备台账',
      icon: 'ep:key',
      auth: '/tested/device',
    },
    children: [
      {
        path: '/devicelist',
        component: Layout,
        redirect: '/dinfo',
        name: 'DeviceList',
        meta: {
          title: '设备信息管理',
          icon: 'ep:key',
          auth: '/tested/device/info',
        },
        children: [
          {
            path: '/dinfo',
            name: 'DeviceInfo',
            component: () => import('@/views/tested/device/info/index.vue'),
            meta: {
              title: '设备信息管理',
              auth: '/tested/device/info',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/devicelist',
            },
          },
        ],
      },
      {
        path: '/speciallist',
        component: Layout,
        redirect: '/specialpage',
        name: 'SpecialList',
        meta: {
          title: '特种设备管理',
          icon: 'ep:key',
          auth: '/tested/device/special',
        },
        children: [
          {
            path: '/specialpage',
            name: 'SpecialPage',
            component: () => import('@/views/tested/device/special/index.vue'),
            meta: {
              title: '特种设备管理',
              auth: '/tested/device/special',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/speciallist',
            },
          },
        ],
      },
      {
        path: '/grouplist',
        component: Layout,
        redirect: '/grouppage',
        name: 'GroupList',
        meta: {
          title: '设备分组管理',
          icon: 'ep:key',
          auth: '/tested/device/group',
        },
        children: [
          {
            path: '/grouppage',
            name: 'GroupPage',
            component: () => import('@/views/tested/device/group/index.vue'),
            meta: {
              title: '设备分组管理',
              auth: '/tested/device/group',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/grouplist',
            },
          },
        ],
      },
      {
        path: '/dcertificatelist',
        component: Layout,
        redirect: '/dcertificatepage',
        name: 'DCertificateList',
        meta: {
          title: '证书管理',
          icon: 'ep:key',
          auth: '/tested/device/certificate',
        },
        children: [
          {
            path: '/dcertificatepage',
            name: 'DCertificatePage',
            component: () => import('@/views/tested/device/certificate/index.vue'),
            meta: {
              title: '证书管理',
              auth: '/tested/device/certificate',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/dcertificatelist',
            },
          },
        ],
      },
      {
        path: '/dremindlist',
        component: Layout,
        redirect: '/dremindpage',
        name: 'DremindList',
        meta: {
          title: '到期提醒',
          icon: 'ep:key',
          auth: '/tested/device/remind',
        },
        children: [
          {
            path: '/dremindpage',
            name: 'DRemindPage',
            component: () => import('@/views/tested/device/remind/index.vue'),
            meta: {
              title: '到期提醒',
              auth: '/tested/device/remind',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/dremindlist',
            },
          },
        ],
      },
    ],
  },
  // 状态维护
  {
    path: '/meteringstatus',
    component: Layout,
    redirect: '/seallist',
    name: 'MeteringStatus',
    meta: {
      title: '状态维护',
      icon: 'ep:key',
      auth: '/tested/status',
    },
    children: [
      {
        path: '/seallist',
        component: Layout,
        redirect: '/sealpage',
        name: 'SealList',
        meta: {
          title: '封存申请',
          icon: 'ep:key',
          auth: '/tested/status/seal',
        },
        children: [
          {
            path: '/sealpage',
            name: 'SealPage',
            component: () => import('@/views/tested/status/seal/index.vue'),
            meta: {
              title: '封存申请',
              auth: '/tested/status/seal',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/seallist',
            },
          },
        ],
      },
      {
        path: '/unseallist',
        component: Layout,
        redirect: '/unsealpage',
        name: 'UnSealList',
        meta: {
          title: '启封申请',
          icon: 'ep:key',
          auth: '/tested/status/unseal',
        },
        children: [
          {
            path: '/unsealpage',
            name: 'UnSealPage',
            component: () => import('@/views/tested/status/unseal/index.vue'),
            meta: {
              title: '启封申请',
              auth: '/tested/status/unseal',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/unseallist',
            },
          },
        ],
      },
      {
        path: '/disablelist',
        component: Layout,
        redirect: '/disablepage',
        name: 'DisableList',
        meta: {
          title: '禁用申请',
          icon: 'ep:key',
          auth: '/tested/status/disable',
        },
        children: [
          {
            path: '/disablepage',
            name: 'DisablePage',
            component: () => import('@/views/tested/status/disable/index.vue'),
            meta: {
              title: '禁用申请',
              auth: '/tested/status/disable',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/disablelist',
            },
          },
        ],
      },
      {
        path: '/scraplist',
        component: Layout,
        redirect: '/scrappage',
        name: 'ScrapList',
        meta: {
          title: '报废申请',
          icon: 'ep:key',
          auth: '/tested/status/scrap',
        },
        children: [
          {
            path: '/scrappage',
            name: 'ScrapPage',
            component: () => import('@/views/tested/status/scrap/index.vue'),
            meta: {
              title: '报废申请',
              auth: '/tested/status/scrap',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/scraplist',
            },
          },
        ],
      },
      {
        path: '/sdelaylist',
        component: Layout,
        redirect: '/sdelaypage',
        name: 'SDelayList',
        meta: {
          title: '延用申请',
          icon: 'ep:key',
          auth: '/tested/status/delay',
        },
        children: [
          {
            path: '/sdelaypage',
            name: 'SDealyPage',
            component: () => import('@/views/tested/status/delay/index.vue'),
            meta: {
              title: '延用申请',
              auth: '/tested/status/delay',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/sdelaylist',
            },
          },
        ],
      },
    ],
  },
  // 文档管理
  {
    path: '/testeddocument',
    component: Layout,
    redirect: '/documentlist',
    name: 'TestedDocument',
    meta: {
      title: '文档管理',
      icon: 'ep:key',
      auth: '/tested/document',
    },
    children: [
      {
        path: '/documentlist',
        component: () => import('@/views/tested/document/list/index.vue'),
        name: 'DocumentList',
        meta: {
          title: '文档管理',
          icon: 'ep:key',
          auth: '/tested/document',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/documentlist',
        },
      },
    ],
  },
  // 计量业务管理
  {
    path: '/meteringbusiness',
    component: Layout,
    redirect: '/satisfactionlist',
    name: 'MeteringBusiness',
    meta: {
      title: '计量业务',
      icon: 'ep:key',
      auth: '/tested/business',
    },
    children: [
      {
        path: '/satisfactionlist',
        component: Layout,
        redirect: '/satisfaction',
        name: 'SatisfactionList',
        meta: {
          title: '委托方满意度调查表',
          icon: 'ep:key',
          auth: '/tested/business/satisfaction',
        },
        children: [
          {
            path: '/satisfaction',
            name: 'SatisfactionPage',
            component: () => import('@/views/tested/MeasurementBusiness/satisfaction/index.vue'),
            meta: {
              title: '委托方满意度调查表',
              auth: '/tested/business/satisfaction',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/satisfactionlist',
            },
          },
        ],
      },
      {
        path: '/opinionlist',
        component: Layout,
        redirect: '/opinion',
        name: 'OpinionList',
        meta: {
          title: '委托方意见反馈表',
          icon: 'ep:key',
          auth: '/tested/business/opinion',
        },
        children: [
          {
            path: '/opinion',
            name: 'opinionPage',
            component: () => import('@/views/tested/MeasurementBusiness/opinion/index.vue'),
            meta: {
              title: '委托方意见反馈表',
              auth: '/tested/business/opinion',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/opinionlist',
            },
          },
        ],
      },
      {
        path: '/detectionlist',
        component: Layout,
        redirect: '/detection',
        name: 'detectionList',
        meta: {
          title: '检测结果复查通知单',
          icon: 'ep:key',
          auth: '/tested/business/detection',
        },
        children: [
          {
            path: '/detection',
            name: 'detectionPage',
            component: () => import('@/views/tested/MeasurementBusiness/detection/index.vue'),
            meta: {
              title: '检测结果复查通知单',
              auth: '/tested/business/detection',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/detectionlist',
            },
          },
        ],
      },
    ],
  },
  // 系统设置
  {
    path: '/system',
    component: Layout,
    redirect: '/system/area',
    name: 'System',
    meta: {
      title: '系统设置',
      icon: 'ep:key',
      auth: '/tested/system',
    },
    children: [
      {
        path: '/area',
        component: Layout,
        redirect: '/area/list',
        name: 'AreaManage',
        meta: {
          title: '区域管理',
          icon: 'ep:key',
          auth: '/sys/area',
        },
        children: [
          {
            path: 'list',
            name: 'AreaList',
            component: () => import('@/views/system/area/listArea.vue'),
            meta: {
              title: '区域管理',
              auth: '/sys/area',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/area',
            },
          },
        ],
      },
      {
        path: '/resource',
        component: Layout,
        redirect: '/resource/list',
        name: 'ResourceManage',
        meta: {
          title: '资源管理',
          icon: 'ep:key',
          auth: '/sys/resource',
        },
        children: [
          {
            path: 'list',
            name: 'ResourceList',
            component: () => import('@/views/system/resource/listResource.vue'),
            meta: {
              title: '资源管理',
              auth: '/sys/resource',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/resource',
            },
          },
        ],
      },
      {
        path: '/dept',
        component: Layout,
        redirect: '/dept/list',
        name: 'DeptManage',
        meta: {
          title: '组织管理',
          icon: 'ep:key',
          auth: '/sys/dept',
        },
        children: [
          {
            path: 'list',
            name: 'DeptList',
            component: () => import('@/views/system/dept/listDept.vue'),
            meta: {
              title: '组织管理',
              auth: '/sys/dept',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/dept',
            },
          },
        ],
      },
      {
        path: '/role',
        component: Layout,
        redirect: '/role/list',
        name: 'RoleManage',
        meta: {
          title: '角色管理',
          icon: 'ep:key',
          auth: '/sys/role',
        },
        children: [
          {
            path: 'list',
            name: 'RoleList',
            component: () => import('@/views/system/role/listRole.vue'),
            meta: {
              title: '角色管理',
              auth: '/sys/role',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/role',
            },
          },
        ],
      },
      {
        path: '/user',
        component: Layout,
        redirect: '/user/list',
        name: 'UserManage',
        meta: {
          title: '用户管理',
          icon: 'ep:key',
          auth: '/sys/mgr',
        },
        children: [
          {
            path: 'list',
            name: 'UserList',
            component: () => import('@/views/system/user/listUser.vue'),
            meta: {
              title: '用户管理',
              auth: '/sys/mgr',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/user',
            },
          },
        ],
      },
      {
        path: '/dict',
        component: Layout,
        redirect: '/dict/list',
        name: 'DictManage',
        meta: {
          title: '字典管理',
          icon: 'ep:key',
          auth: '/sys/dict',
        },
        children: [
          {
            path: 'list',
            name: 'DictList',
            component: () => import('@/views/system/dict/listDict.vue'),
            meta: {
              title: '字典管理',
              auth: '/sys/dict',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/dict',
            },
          },
        ],
      },
      {
        path: '/process',
        component: Layout,
        redirect: '/process/list',
        name: 'Process',
        meta: {
          title: '流程管理',
          icon: 'ep:key',
          auth: '/sys/process',
        },
        children: [
          {
            path: 'list',
            name: 'ProcessList',
            component: () => import('@/views/system/process/process.vue'),
            meta: {
              title: '流程管理',
              icon: 'ep:key',
              auth: '/sys/process',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/process',
            },
          },
          {
            path: 'edit',
            name: 'ProcessListEdit',
            component: () => import('@/views/system/process/editProcess.vue'),
            meta: {
              title: '流程管理',
              icon: 'ep:key',
              auth: '/sys/process',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/process/list',
            },
          },
          {
            path: 'detail',
            name: 'ProcessListDetail',
            component: () => import('@/views/system/process/detailProcess.vue'),
            meta: {
              title: '流程管理',
              icon: 'ep:key',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/process/list',
            },
          },
          {
            path: 'add',
            name: 'ProcessListAdd',
            component: () => import('@/views/system/process/addProcess.vue'),
            meta: {
              title: '流程管理',
              icon: 'ep:key',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/process/list',
            },
          },
        ],
      },
      {
        path: '/tenant',
        component: Layout,
        redirect: '/tenant/list',
        name: 'TenantManage',
        meta: {
          title: '项目管理',
          icon: 'ep:key',
          auth: '/sys/tenantSys/list',
        },
        children: [
          {
            path: 'list',
            name: 'TenantList',
            component: () => import('@/views/system/tenant/list.tenant.vue'),
            meta: {
              title: '项目管理',
              auth: '/sys/tenantSys/list',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/tenant',
            },
          },
        ],
      },
      {
        path: '/businessLog',
        component: Layout,
        redirect: '/businessLog/list',
        name: 'BusinessLog',
        meta: {
          title: '业务日志',
          icon: 'ep:key',
          auth: '/sys/log/biz/list',
        },
        children: [
          {
            path: 'list',
            name: 'BusinessList',
            component: () => import('@/views/system/log/listLog.vue'),
            meta: {
              title: '业务日志',
              auth: '/sys/log/biz/list',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/businessLog',
            },
          },
        ],
      },
      {
        path: '/error',
        component: Layout,
        redirect: '/error/list',
        name: 'ErrorLog',
        meta: {
          title: '异常日志',
          icon: 'ep:key',
          auth: '/sys/log/error/list',
        },
        children: [
          {
            path: 'list',
            name: 'ErrorList',
            component: () => import('@/views/system/log/listErrorLog.vue'),
            meta: {
              title: '异常日志',
              auth: '/sys/log/error/list',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/error',
            },
          },
        ],
      },
      {
        path: '/loginDiary',
        component: Layout,
        redirect: '/loginDiary/list',
        name: 'loginDiaryLog',
        meta: {
          title: '登录日志',
          icon: 'ep:key',
          auth: '/sys/loginLog',
        },
        children: [
          {
            path: 'list',
            name: 'loginDiaryList',
            component: () => import('@/views/system/log/LoginLog.vue'),
            meta: {
              title: '登录日志',
              auth: '/sys/loginLog',
              sidebar: false,
              breadcrumb: false,
              activeMenu: '/loginDiary',
            },
          },
        ],
      }],
  },

  // 示例菜单
  // {
  //   path: '/tested',
  //   component: Layout,
  //   redirect: '/index3',
  //   name: 'Metering',
  //   meta: {
  //     title: '受检设备',
  //     icon: 'ep:key',
  //     auth: '/tested/index',
  //   },
  //   children: [
  //     {
  //       path: '/index3',
  //       component: Layout,
  //       redirect: '/list3',
  //       name: 'Index113',
  //       meta: {
  //         title: '区域管理',
  //         icon: 'ep:key',
  //         auth: '/tested/index',
  //       },
  //       children: [
  //         {
  //           path: '/list3',
  //           name: 'AreaList122',
  //           component: () => import('@/views/tested/index.vue'),
  //           meta: {
  //             title: '区域管理',
  //             auth: '/tested/index',
  //             sidebar: false,
  //             breadcrumb: false,
  //             activeMenu: '/index3',
  //           },
  //         },
  //       ],
  //     },
  //     {
  //       path: '/index4',
  //       component: Layout,
  //       redirect: '/list4',
  //       name: 'Index1134',
  //       meta: {
  //         title: '区域管理',
  //         icon: 'ep:key',
  //         // auth: '/tested/index',
  //       },
  //       children: [
  //         {
  //           path: '/list4',
  //           name: 'a2a222',
  //           component: () => import('@/views/dashboard.vue'),
  //           meta: {
  //             title: '区域管理',
  //             // auth: '/tested/index',
  //             sidebar: false,
  //             breadcrumb: false,
  //             activeMenu: '/index4',
  //           },
  //         },
  //       ],
  //     },
  //   ],
  // },
]

export default routes