generator-platform-routers.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. // eslint-disable-next-line
  2. import * as loginService from '@/api/upms/login'
  3. // eslint-disable-next-line
  4. import { UserLayout, BasicLayout, BlankLayout, RouteView, PageView } from '@/layouts'
  5. import { GlobalConstant } from '@/constant'
  6. import BaseTool from '../utils/tool'
  7. // 前端路由表
  8. const constantRouterComponents = {
  9. // 基础页面 layout 必须引入
  10. 'UserLayout': UserLayout,
  11. 'BasicLayout': BasicLayout,
  12. 'BlankLayout': BlankLayout,
  13. 'RouteView': RouteView,
  14. 'PageView': PageView,
  15. '403': () => import(/* webpackChunkName: "error" */ '@/views/exception/403'),
  16. '404': () => import(/* webpackChunkName: "error" */ '@/views/exception/404'),
  17. '500': () => import(/* webpackChunkName: "error" */ '@/views/exception/500'),
  18. 'IndexView': () => import(/* webpackChunkName: "error" */ '@/views/index/Index'),
  19. // upms
  20. 'Dept': () => import('@/views/upms/dept/Dept'),
  21. 'User': () => import('@/views/upms/user/User'),
  22. 'Role': () => import('@/views/upms/role/Role'),
  23. 'Menu': () => import('@/views/upms/menu/Menu'),
  24. 'Dict': () => import('@/views/upms/dict/Dict'),
  25. 'Notice': () => import('@/views/upms/notice/SysNotice'),
  26. 'Log': () => import('@/views/upms/log/Log'),
  27. 'Task': () => import('@/views/upms/task/Task'),
  28. 'Config': () => import('@/views/upms/config/Config'),
  29. 'SysTeam': () => import('@/views/upms/team/SysTeam'),
  30. // result
  31. 'ResultSuccess': () => import(/* webpackChunkName: "result" */ '@/views/result/Success'),
  32. 'ResultFail': () => import(/* webpackChunkName: "result" */ '@/views/result/Error'),
  33. // exception
  34. 'Exception403': () => import(/* webpackChunkName: "fail" */ '@/views/exception/403'),
  35. 'Exception404': () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'),
  36. 'Exception500': () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'),
  37. // account
  38. 'AccountCenter': () => import('@/views/account/center/Index'),
  39. 'AccountSettings': () => import('@/views/account/settings/Index'),
  40. // 其他组件
  41. 'SystemRoleList': () => import('@/views/role/RoleList'),
  42. // 设备类型
  43. 'SbType': () => import('@/views/sb/type/SbType'),
  44. // 设备位置
  45. 'SbPosition': () => import('@/views/sb/position/SbPosition'),
  46. // 设备位置台账
  47. 'SbPositionCount': () => import('@/views/sb/count/SbPositionCount'),
  48. 'SbPositionNum': () => import('@/views/sb/position/SbPositionNum'),
  49. // 设备状态台账
  50. 'SbStatusCount': () => import('@/views/sb/count/SbStatusCount'),
  51. // 设备自定义类型台账
  52. 'SbUseTypeCount': () => import('@/views/sb/count/SbUseTypeCount'),
  53. // 设别规格
  54. 'SbGuige': () => import('@/views/sb/guige/SbGuige'),
  55. // 设别基础信息
  56. 'SbInfo': () => import('@/views/sb/info/SbInfo'),
  57. // 测量设备基础信息
  58. 'MeasureSbInfo': () => import('@/views/sb/info/MeasureSbInfo'),
  59. 'MeasureSbInfoAll': () => import('@/views/sb/info/MeasureSbInfoAll'),
  60. // 测量设备基础信息-需要检定-外部检定的
  61. 'MeasureSbInfoCheck': () => import('@/views/sb/info/MeasureSbInfoCheck'),
  62. // 测量设备基础信息-需要检定-自检的
  63. 'MeasureSbInfoCheckSelf': () => import('@/views/sb/info/MeasureSbInfoCheckSelf'),
  64. // 测量设备基础信息-不需要检定的
  65. 'MeasureSbInfoNotCheck': () => import('@/views/sb/info/MeasureSbInfoNotCheck'),
  66. // 测量设备预警台账
  67. 'MeasureSbInfoWarn': () => import('@/views/sb/info/MeasureSbInfoWarn'),
  68. // 测量设备基础信息-在库
  69. 'MeasureSbInfoInStore': () => import('@/views/sb/info/MeasureSbInfoInStore'),
  70. // 测量设备-检定记录
  71. 'MeasureLog': () => import('@/views/sb/measurelog/MeasureLog'),
  72. // 特种设备-检定记录
  73. 'MeasureLogSpecial': () => import('@/views/sb/measurelog/MeasureLogSpecial'),
  74. // 特种设备基础信息
  75. 'SpecialSbInfo': () => import('@/views/sb/info/SpecialSbInfo'),
  76. 'SpecialSbInfo2': () => import('@/views/sb/info/SpecialSbInfo2'),
  77. // 特种设备预警
  78. 'SpecialSbInfoWarn': () => import('@/views/sb/info/SpecialSbInfoWarn'),
  79. // 特种设备在库
  80. 'SpecialSbInfoInStore': () => import('@/views/sb/info/SpecialSbInfoInStore'),
  81. // 父子设备树
  82. 'ParentSbInfo': () => import('@/views/sb/info/ParentSbInfo'),
  83. // 设别型号库
  84. 'SbModel': () => import('@/views/sb/model/SbModel'),
  85. // 设备bom
  86. 'SbModelBom': () => import('@/views/sb/modelbom/SbModelBom'),
  87. // 设备型号筛选对应的备件bom
  88. 'SbModelSpareListBom': () => import('@/views/sb/modelbom/SbModelSpareListBom'),
  89. // 设备树
  90. 'SbInfoTree': () => import('@/views/sb/info/SbInfoTree'),
  91. // 部位类别
  92. 'PartType': () => import('@/views/part/type/PartType'),
  93. // 部位信息
  94. 'PartInfo': () => import('@/views/part/info/PartInfo'),
  95. // 设备部位信息
  96. 'SbInfoForPartInfo': () => import('@/views/sb/info/SbInfoForPartInfo'),
  97. // 位号信息
  98. 'Location': () => import('@/views/sb/location/Location'),
  99. // 设备位号信息
  100. 'SbInfoForLocation': () => import('@/views/sb/info/SbInfoForLocation'),
  101. // 备件类别
  102. 'SpareType': () => import('@/views/sqarepartmanage/sparetype/SpareType'),
  103. // 备件基础信息和报表
  104. 'SparePartInfo': () => import('@/views/sqarepartmanage/sparepartinfo/SparePartInfo'),
  105. 'SparePartInfoPrint': () => import('@/views/sqarepartmanage/sparepartinfo/SparePartInfoPrint'),
  106. 'SparePartMonthReport': () => import('@/views/sqarepartmanage/report/SparePartMonthReport'),
  107. // 备件库存汇总、备件库存汇总预警、备件保养预警(已废弃,改成备件更换预警)
  108. 'SparePartTotal': () => import('@/views/sqarepartmanage/sparepartinfo/SparePartTotal'),
  109. 'SparePartTotalMinStock': () => import('@/views/sqarepartmanage/sparepartinfo/SparePartTotalMinStock'),
  110. 'SparePartTotalCheckStock': () => import('@/views/sqarepartmanage/sparepartinfo/SparePartTotalCheckStock'),
  111. 'SpareUpdateAlert': () => import('@/views/sqarepartmanage/sparepartinfo/SpareUpdateAlert'),
  112. // 仓库汇总、仓库备件库存汇总(单个仓库的)
  113. 'SpareStoreTotal': () => import('@/views/store/sparestore/SpareStoreTotal'),
  114. 'SpareStoreTotalMinStock': () => import('@/views/store/sparestore/SpareStoreTotalMinStock'),
  115. // 备件使用信息
  116. 'SparePartUsed': () => import('@/views/sqarepartmanage/sparepartused/SparePartUsed'),
  117. 'SbInfoStopDetail': () => import('@/views/sb/stop-detail/SbInfoStopDetail'),
  118. // 点检
  119. 'SpotCheckStandard': () => import('@/views/check/checkstandard/SpotCheckStandard'),
  120. 'SpotCheckProject': () => import('@/views/check/checkproject/SpotCheckProject'),
  121. 'SpotCheckPlan': () => import('@/views/check/checkplan/SpotCheckPlan'),
  122. 'SpotCheckJobOverTime': () => import('@/views/check/checkjob/SpotCheckJobOverTime'),
  123. 'SpotCheckJob': () => import('@/views/check/checkjob/SpotCheckJob'),
  124. 'SpotCheckJobFinish': () => import('@/views/check/checkjob/SpotCheckJobFinish'),
  125. // 保养
  126. 'PollingCheckStandard': () => import('@/views/check/checkstandard/PollingCheckStandard'),
  127. 'PollingCheckProject': () => import('@/views/check/checkproject/PollingCheckProject'),
  128. 'PollingCheckPlan': () => import('@/views/check/checkplan/PollingCheckPlan'),
  129. 'PollingCheckJob': () => import('@/views/check/checkjob/PollingCheckJob'),
  130. 'PollingCheckJobOverTime': () => import('@/views/check/checkjob/PollingCheckJobOverTime'),
  131. 'PollingCheckJobFinish': () => import('@/views/check/checkjob/PollingCheckJobFinish'),
  132. // 润滑
  133. 'RunCheckStandard': () => import('@/views/check/checkstandard/RunCheckStandard'),
  134. 'RunCheckProject': () => import('@/views/check/checkproject/RunCheckProject'),
  135. 'RunCheckPlan': () => import('@/views/check/checkplan/RunCheckPlan'),
  136. 'RunCheckJob': () => import('@/views/check/checkjob/RunCheckJob'),
  137. 'RunCheckJobOverTime': () => import('@/views/check/checkjob/RunCheckJobOverTime'),
  138. 'RunCheckJobFinish': () => import('@/views/check/checkjob/RunCheckJobFinish'),
  139. // 工器具校准
  140. 'AdjustCheckStandard': () => import('@/views/check/checkstandard/AdjustCheckStandard'),
  141. 'AdjustCheckProject': () => import('@/views/check/checkproject/AdjustCheckProject'),
  142. 'AdjustCheckPlan': () => import('@/views/check/checkplan/AdjustCheckPlan'),
  143. 'AdjustCheckJob': () => import('@/views/check/checkjob/AdjustCheckJob'),
  144. // 特种设备定期检验
  145. 'SpecialCheckStandard': () => import('@/views/check/checkstandard/SpecialCheckStandard'),
  146. 'SpecialCheckProject': () => import('@/views/check/checkproject/SpecialCheckProject'),
  147. 'SpecialCheckPlan': () => import('@/views/check/checkplan/SpecialCheckPlan'),
  148. 'SpecialCheckJob': () => import('@/views/check/checkjob/SpecialCheckJob'),
  149. // 仓库信息
  150. 'Store': () => import('@/views/store/store/Store'),
  151. // 备件库存
  152. 'SpareStore': () => import('@/views/store/sparestore/SpareStore'),
  153. 'PurchaseStoreForm': () => import('@/views/store/purchaseform/PurchaseStoreForm'),
  154. // 备件二级库存
  155. 'SpareStoreSecond': () => import('@/views/store/sparestoresecond/SpareStoreSecond'),
  156. // 入库登记单
  157. 'InStoreForm': () => import('@/views/store/instoreform/InStoreForm'),
  158. // 出库登记单
  159. 'OutStoreForm': () => import('@/views/store/outstoreform/OutStoreForm'), // 出库
  160. 'OutStoreFormYY': () => import('@/views/store/outstoreform/OutStoreFormYY'), // 用友出库
  161. 'OutStoreFormBackYY': () => import('@/views/store/outstoreform/OutStoreFormBackYY'), // 用友退库
  162. // 调拨登记单
  163. 'TransferStoreForm': () => import('@/views/store/transferstoreform/TransferStoreForm'),
  164. // 备件领用详情
  165. 'SparePickDetail': () => import('@/views/store/sparepickdetail/SparePickDetail'),
  166. // 备件领用登记单
  167. 'SparePickForm': () => import('@/views/store/sparepickform/SparePickForm'),
  168. // 备件回收详情
  169. 'SpareRecoveryDetail': () => import('@/views/store/sparerecoverydetail/SpareRecoveryDetail'),
  170. // 备件回收登记单
  171. 'SpareRecoveryForm': () => import('@/views/store/sparerecoveryform/SpareRecoveryForm'),
  172. // 备件退库详情
  173. 'SpareRestoreDetail': () => import('@/views/store/sparerestoredetail/SpareRestoreDetail'),
  174. // 备件退库登记单
  175. 'SpareRestoreForm': () => import('@/views/store/sparerestoreform/SpareRestoreForm'),
  176. // 备件退货详情
  177. 'SpareBackDetail': () => import('@/views/store/sparebackdetail/SpareBackDetail'),
  178. // 备件退货登记单
  179. 'SpareBackForm': () => import('@/views/store/sparebackform/SpareBackForm'),
  180. // 入库详情
  181. 'InStoreDetail': () => import('@/views/store/instoredetail/InStoreDetail'),
  182. // 出库详情
  183. 'OutStoreDetail': () => import('@/views/store/outstoredetail/OutStoreDetail'),
  184. // 调拨详情
  185. 'TransferStoreDetail': () => import('@/views/store/transferstoredetail/TransferStoreDetail'),
  186. // 报修单
  187. 'RepairApplicationForm': () => import('@/views/repair/application-form/RepairApplicationForm'),
  188. 'RepairOut': () => import('@/views/repair/application-form/RepairOut'),
  189. // 验收单
  190. 'RepairCheckForm': () => import('@/views/repair/application-form/RepairCheckForm'),
  191. // 维修单
  192. 'RepairForm': () => import('@/views/repair/application-form/RepairForm'),
  193. 'RepairCloseForm': () => import('@/views/repair/application-form/RepairCloseForm'),
  194. 'MRepairForm': () => import('@/views/repair/application-form/MyRepairForm'),
  195. 'MyRepairForm': () => import('@/views/repair/form/MyRepairForm'),
  196. 'WaitRepairForm': () => import('@/views/repair/application-form/WaitRepairForm'),
  197. 'RepairCallerCheckForm': () => import('@/views/repair/application-form/RepairCallerCheckForm'),
  198. 'RepairManagerCheckForm': () => import('@/views/repair/application-form/RepairManagerCheckForm'),
  199. 'WaitAllocatedRepairForm': () => import('@/views/repair/application-form/WaitAllocatedRepairForm'),
  200. 'WaitDispatchRepairForm': () => import('@/views/repair/application-form/WaitDispatchRepairForm'),
  201. 'ReportRepairForm': () => import('@/views/repair/application-form/ReportRepairForm'),
  202. 'RepairFormPool': () => import('@/views/repair/application-form/RepairFormPool'),
  203. // 验收单
  204. 'RepairCheck': () => import('@/views/repair/check/RepairCheck'),
  205. // 故障类别
  206. 'ErrorType': () => import('@/views/repair/errortype/ErrorType'),
  207. // 维修费用单
  208. 'RepairFee': () => import('@/views/repair/fee/RepairFee'),
  209. // 维修项目
  210. 'RepairProject': () => import('@/views/repair/repairproject/RepairProject'),
  211. 'RepairReason': () => import('@/views/repair/repair-reason/RepairReason'),
  212. // 生产商
  213. 'FirmProducer': () => import('@/views/firm/producer/FirmProducer'),
  214. // 巡检管理
  215. 'FillInfo': () => import('@/views/fill/info/FillInfo'),
  216. 'FillGather': () => import('@/views/fill/gather/FillGather'),
  217. 'FillGatherTask': () => import('@/views/fill/task/FillGatherTask'),
  218. 'BackFillGatherTask': () => import('@/views/fill/task/BackFillGatherTask'),
  219. 'VerifyFillGatherTask': () => import('@/views/fill/task/VerifyFillGatherTask'),
  220. 'SbInspectionFill': () => import('@/views/sb/inspection-fill/SbInspectionFill'),
  221. 'MySbInspectionFill': () => import('@/views/sb/inspection-fill/MySbInspectionFill'),
  222. 'ZGSbInspectionFill': () => import('@/views/sb/inspection-fill/ZGSbInspectionFill'),
  223. 'AdminSbInspectionFill': () => import('@/views/sb/inspection-fill/AdminSbInspectionFill'),
  224. 'SbRunFill': () => import('@/views/sb/run-fill/SbRunFill'),
  225. 'ZGSbRunFill': () => import('@/views/sb/run-fill/ZGSbRunFill'),
  226. 'MySbRunFill': () => import('@/views/sb/run-fill/MySbRunFill'),
  227. 'AdminSbRunFill': () => import('@/views/sb/run-fill/AdminSbRunFill'),
  228. // 仓库月报表
  229. 'StoreMonthReport': () => import('@/views/report/store/StoreMonthReport'),
  230. // 出入库明细+汇总
  231. 'ReportInStoreDetail': () => import('@/views/report/instoredetail/InStoreDetail'),
  232. 'MyReportInStoreDetail': () => import('@/views/report/instoredetail/MyInStoreDetail'),
  233. 'ReportOutStoreDetail': () => import('@/views/report/outstoredetail/OutStoreDetail'),
  234. 'MyReportOutStoreDetail': () => import('@/views/report/outstoredetail/MyOutStoreDetail'),
  235. 'ReportInStoreCount': () => import('@/views/report/instorecount/InStoreCount'),
  236. 'ReportOutStoreCount': () => import('@/views/report/outstorecount/OutStoreCount'),
  237. 'ReportSparePartInfo': () => import('@/views/report/sparepartinfo/SparePartInfo'),
  238. 'ReportSparePickDetail': () => import('@/views/report/sparepickdetail/SparePickDetail'),
  239. 'MyReportSparePickDetail': () => import('@/views/report/sparepickdetail/MySparePickDetail'),
  240. 'ReportSparePickCount': () => import('@/views/report/sparepickcount/SparePickCount'),
  241. 'StatisticsRepairFormSb': () => import('@/views/statistics/repair/StatisticsRepairFormSb'),
  242. 'StatisticsRepairFormMonth': () => import('@/views/statistics/repair/StatisticsRepairFormMonthView'),
  243. 'StatisticsRepairFormErrorType': () => import('@/views/statistics/repair/StatisticsRepairFormErrorTypeView'),
  244. 'StatisticsSparePartUsedSpare': () => import('@/views/statistics/spare/StatisticsSparePartUsedSpare'),
  245. 'StatisticsRepairFormUser': () => import('@/views/statistics/repair/StatisticsRepairFormUserView'),
  246. 'WorkplaceBacklog': () => import('@/views/workplace/backlog/WorkplaceBacklog'),
  247. 'Workbench': () => import('@/views/workplace/backlog/Workbench'),
  248. 'StoreWorkplaceBacklog': () => import('@/views/workplace/backlog/StoreWorkplaceBacklog'),
  249. 'SbWorkplaceBacklog': () => import('@/views/workplace/backlog/SbWorkplaceBacklog'),
  250. 'NewWorkplaceBacklog': () => import('@/views/workplace/backlog/NewWorkplaceBacklog'),
  251. 'Supplier': () => import('@/views/purchase/supplier/Supplier'),
  252. 'SupplierApply': () => import('@/views/purchase/supplier/SupplierApply'),
  253. 'PurchaseDemandPlan': () => import('@/views/purchase/purchase-demand-plan/PurchaseDemandPlan'),
  254. 'PurchasePlan': () => import('@/views/purchase/purchase-plan/PurchasePlan'),
  255. 'PurchasePayment': () => import('@/views/purchase/purchase-payment/PurchasePaymentPage'),
  256. 'PurchaseReimburse': () => import('@/views/purchase/purchase-reimburse/PurchaseReimbursePage'),
  257. 'PurchaseOrder': () => import('@/views/purchase/purchase-order/PurchaseOrder'),
  258. 'PurchaseApply': () => import('@/views/purchase/purchase-apply/PurchaseApply'),
  259. 'PurchaseDispatchOrderPage': () => import('@/views/purchase/purchase-dispatch-order/PurchaseDispatchOrderPage'),
  260. // 审批
  261. 'Model': () => import('@/views/activiti/model/Model'),
  262. 'Flow': () => import('@/views/activiti/flow/Flow'),
  263. 'MyTask': () => import('@/views/activiti/task/MyTask'), // 我的待办
  264. 'MyTaskFinish': () => import('@/views/activiti/task/MyTaskFinish'), // 我的已办
  265. 'MyTaskClaim': () => import('@/views/activiti/task/MyTaskClaim'), // 我的签收
  266. 'MyStart': () => import('@/views/activiti/task/MyStart'), // 我的申请
  267. 'ActivitiUserModel': () => import('@/views/activiti/user-model/ActivitiUserModel'), // 流程审批节点设置
  268. 'DesignForm': () => import('@/views/design/designForm/DesignForm'),
  269. // 隐患管理
  270. 'HiddenDangerWait': () => import('@/views/hidden/hidden/HiddenDangerWait'), // 隐患任务
  271. 'HiddenDangerHandle': () => import('@/views/hidden/hidden/HiddenDangerHandle'), // 隐患任务
  272. // 调拨申请
  273. 'SbAllocateApply': () => import('@/views/sb/allocate-apply/ProjectSbAllocateApply'),
  274. 'GroupToProjectSbAllocateApply': () => import('@/views/sb/allocate-apply/GroupToProjectSbAllocateApply'),
  275. 'ProjectToProjectSbAllocateApply': () => import('@/views/sb/allocate-apply/ProjectToProjectSbAllocateApply'),
  276. 'MySbAllocateApply': () => import('@/views/sb/allocate-apply/MySbAllocateApply'),
  277. 'ZGSbAllocateApply': () => import('@/views/sb/allocate-apply/ZGSbAllocateApply'),
  278. 'XmbZgSbAllocateApply': () => import('@/views/sb/allocate-apply/XmbZgSbAllocateApply'),
  279. 'FgsZgSbAllocateApply': () => import('@/views/sb/allocate-apply/FgsZgSbAllocateApply'),
  280. // 调拨审批
  281. 'SbAllocateTaskAudit': () => import('@/views/sb/allocate-task/SbAllocateTaskAudit'),
  282. // 我的功能
  283. 'ProjectStore': () => import('@/views/store/store/ProjectStore'),
  284. 'CompanyStore': () => import('@/views/store/store/CompanyStore'),
  285. 'MyStore': () => import('@/views/store/store/MyStore'),
  286. 'MyInStoreForm': () => import('@/views/store/instoreform/MyInStoreForm'),
  287. 'MyOutStoreForm': () => import('@/views/store/outstoreform/MyOutStoreForm'),
  288. 'MyTransferStoreForm': () => import('@/views/store/transferstoreform/MyTransferStoreForm'),
  289. 'MySparePickForm': () => import('@/views/store/sparepickform/MySparePickForm'),
  290. 'MySbInfo': () => import('@/views/sb/info/MySbInfo'),
  291. 'ProjectSbInfo': () => import('@/views/sb/info/ProjectSbInfo'),
  292. 'BanzuSbInfo': () => import('@/views/sb/info/BanzuSbInfo'),
  293. 'CompanySbInfo': () => import('@/views/sb/info/CompanySbInfo'),
  294. 'MySpareStore': () => import('@/views/store/sparestore/MySpareStore'),
  295. 'MySpareStoreTotal': () => import('@/views/store/sparestore/MySpareStoreTotal'),
  296. 'MyRunCheckJob': () => import('@/views/check/checkjob/MyRunCheckJob'),
  297. 'MyPollingCheckJob': () => import('@/views/check/checkjob/MyPollingCheckJob'),
  298. 'MyPollingCheckJobFinish': () => import('@/views/check/checkjob/MyPollingCheckJobFinish'),
  299. 'MyPollingCheckJobOverTime': () => import('@/views/check/checkjob/MyPollingCheckJobOverTime'),
  300. 'MySpotCheckJob': () => import('@/views/check/checkjob/MySpotCheckJob'),
  301. // 验收单
  302. 'SbCheckForm': () => import('@/views/sb/sbcheckform/SbCheckForm'),
  303. 'FillProjectQuantity': () => import('@/views/fill/project-quantity/FillProjectQuantity'),
  304. 'SbCheckDetail': () => import('@/views/sb/sbcheckdetail/SbCheckDetail'),
  305. // 资料管理
  306. 'Article': () => import('@/views/operate/article/Article'),
  307. 'CustomerInfo': () => import('@/views/operate/customer/CustomerInfo'),
  308. // 设备变动
  309. 'SbScrapForm': () => import('@/views/sb/scraps/SbScrapForm'), // 报废单
  310. // 设备变动记录
  311. 'SbChangeRecord': () => import('@/views/sb/change-record/SbChangeRecord'), // 设备变动记录
  312. // 备件盘点
  313. 'StoreCheckPlan': () => import('@/views/store/storecheckplan/StoreCheckPlan'),
  314. 'StoreCheckJob': () => import('@/views/store/storecheckjob/StoreCheckJob'),
  315. // 设备盘点
  316. 'SbStoreCheckPlan': () => import('@/views/sb/storecheckplan/StoreCheckPlan'),
  317. 'SbStoreCheckJob': () => import('@/views/sb/storecheckjob/StoreCheckJob'),
  318. // 保养任务日程表
  319. 'CheckJobCalendar': () => import('@/views/check/checkjob/CheckJobCalendar'),
  320. // 设备状态变更表
  321. 'SbStatusLog': () => import('@/views/sb/status-log/SbStatusLog'),
  322. // 设备停机记录表
  323. 'SbStopLog': () => import('@/views/sb/stop-logs/SbStopLog'),
  324. // 设备安装调试过程记录
  325. 'SbInfoDebug': () => import('@/views/sb/info/SbInfoDebug'),
  326. // 设备试车过程记录
  327. 'SbInfoTestRun': () => import('@/views/sb/info/SbInfoTestRun'),
  328. // 设备报废
  329. 'SbInfoScrap': () => import('@/views/sb/scrap/SbInfoScrap'),
  330. // 设备维护标准
  331. 'SbInfoStandard': () => import('@/views/sb/info/SbInfoStandard'),
  332. // 报表
  333. 'AnalysisSbInfo': () => import('@/views/dashboard/AnalysisSbInfo'), // 保养任务完成率报表
  334. 'CheckJobReport': () => import('@/views/dashboard/CheckJobReport'), // 保养任务完成率报表
  335. 'MeasureLogReport': () => import('@/views/dashboard/MeasureLogReport'), // 检定记录月完成数量报表
  336. 'SbInfoTypeReport': () => import('@/views/dashboard/SbInfoTypeReport'), // 设备类型占比统计
  337. 'CheckJobReportWeek': () => import('@/views/dashboard/CheckJobReportWeek'), // 保养任务周工作负荷统计报表
  338. 'RepairReport': () => import('@/views/dashboard/RepairReport'), // >24小时停机次数按月统计
  339. 'RepairReportSbAll': () => import('@/views/dashboard/RepairReportSbAll'), // 设备故障次数按月统计
  340. 'RepairReportSbInfo': () => import('@/views/dashboard/RepairReportSbInfo'), // 设备维修报表
  341. 'RepairReportSbInfoFee': () => import('@/views/dashboard/RepairReportSbInfoFee'), // 设备维修费用报表
  342. 'RepairReportMttr': () => import('@/views/dashboard/RepairReportMttr'), // MTTR月统计报表
  343. 'RepairReportFee': () => import('@/views/dashboard/RepairReportFee'), // 费用按月统计
  344. 'StoreReport1': () => import('@/views/dashboard/StoreReport1'), // 仓库报表
  345. 'RepairScreen': () => import('@/views/big-screen/RepairScreen'), // 车间大屏
  346. // 工作台
  347. 'SbInfoWorkplaceBacklog': () => import('@/views/workplace/backlog/SbInfoWorkplaceBacklog'), // 设备工作台
  348. // 自定义管理
  349. 'CustomizeReport': () => import('@/views/customize/report/CustomizeReport'), // 自定义报表
  350. 'CustomFieldTemplate': () => import('@/views/customize/fieldTemplate/CustomFieldTemplate'), // 自定义模板
  351. 'CustomFieldTemplateData': () => import('@/views/customize/fieldTemplateData/CustomFieldTemplateData'), // 自定义模板数据
  352. // 新增路由
  353. 'SparePartUsedSelectTable': () => import('@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable'), // 备件使用记录
  354. // 电度和遥测数据
  355. 'RemoteMeasure': () => import('@/views/remote/measure/RemoteMeasure'),
  356. 'RemoteMeasureLog': () => import('@/views/remote/measure-log/RemoteMeasureLog'),
  357. 'RemoteDegree': () => import('@/views/remote/degree/RemoteDegree'),
  358. 'RemoteDegreeLog': () => import('@/views/remote/degree-log/RemoteDegreeLog'),
  359. // opc
  360. 'RemoteOpc': () => import('@/views/remote/opc/RemoteOpc'), // 模拟+数字量+创建+未创建(全部的)
  361. 'RemoteOpcNotCreated': () => import('@/views/remote/opc/RemoteOpcNotCreated'), // 服务端未创建对应的点位
  362. 'RemoteOpcLog': () => import('@/views/remote/opc-log/RemoteOpcLog'), // 记录
  363. 'OpcPosition': () => import('@/views/remote/opc/OpcPosition'), // opc车间
  364. 'OpcPositionNot': () => import('@/views/remote/opc/OpcPositionNot'), // opc车间未配置
  365. 'OpcPositionForProducer': () => import('@/views/remote/opc/OpcPositionForProducer'), // opc车间生产入口
  366. // 初始化导入
  367. 'ImportExcel': () => import('@/views/excel/ImportExcel'),
  368. // 乾坤
  369. 'Plan': () => import('@/views/qykh/plan/Plan'),
  370. 'PlanDetail': () => import('@/views/qykh/plan-detail/PlanDetail'),
  371. 'Product': () => import('@/views/qykh/product/Product'),
  372. 'ProductHelp': () => import('@/views/qykh/product-help/ProductHelp'),
  373. 'Hotspot': () => import('@/views/qykh/hotspot/Hotspot'),
  374. 'HotspotHelp': () => import('@/views/qykh/hotspot-help/HotspotHelp'),
  375. 'Information': () => import('@/views/qykh/information/Information'),
  376. 'InformationHelp': () => import('@/views/qykh/information-help/InformationHelp'),
  377. // 筹建管理
  378. 'PreparationAll': () => import('@/views/preparation/preparation/PreparationAll'),
  379. 'PreparationMine': () => import('@/views/preparation/preparation/PreparationMine'),
  380. 'PreparationDispatch': () => import('@/views/preparation/preparation/PreparationDispatch'),
  381. // 防雷检测
  382. 'Light': () => import('@/views/light/light/Light'),
  383. 'LightWaitCheck': () => import('@/views/light/light/LightWaitCheck'),
  384. 'LightLog': () => import('@/views/light/light-log/LightLog'),
  385. // 工器具管理
  386. 'Tool': () => import('@/views/tool/tool/Tool'),
  387. 'ToolWaitCheck': () => import('@/views/tool/tool/ToolWaitCheck'),
  388. 'ToolLog': () => import('@/views/tool/tool-log/ToolLog'),
  389. // 日历
  390. 'Calendar': () => import('@/views/calendar/Calendar')
  391. }
  392. // 前端未找到页面路由(固定不用改)
  393. const notFoundRouter = {
  394. path: '*', redirect: '/404', hidden: true
  395. }
  396. // 根级菜单
  397. const rootRouter = {
  398. key: 'RootIndex',
  399. path: '/',
  400. url: '/',
  401. name: 'index',
  402. component: 'BasicLayout',
  403. meta: { title: '首页' },
  404. redirect: '/WorkplaceBacklog',
  405. type: 1,
  406. children: []
  407. }
  408. /**
  409. * 基础路由
  410. * @type { *[] }
  411. */
  412. export const constantRouterMap = [
  413. {
  414. path: '/user',
  415. component: UserLayout,
  416. redirect: '/user/login',
  417. hidden: true,
  418. children: [
  419. {
  420. path: 'login',
  421. name: 'login',
  422. component: () => import(/* webpackChunkName: "user" */ '@/views/Login')
  423. },
  424. {
  425. path: '/work/scan',
  426. name: 'scan',
  427. component: () => import(/* webpackChunkName: "user" */ '@/views/Scan')
  428. },
  429. {
  430. path: 'register',
  431. name: 'register',
  432. component: () => import(/* webpackChunkName: "user" */ '@/views/Register')
  433. },
  434. {
  435. path: 'register-result',
  436. name: 'registerResult',
  437. component: () => import(/* webpackChunkName: "user" */ '@/views/RegisterResult')
  438. },
  439. {
  440. path: 'recover',
  441. name: 'recover',
  442. component: undefined
  443. }
  444. ]
  445. },
  446. {
  447. path: '/404',
  448. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  449. },
  450. {
  451. path: '/tree',
  452. component: () => import('@/views/sb/info/modules/SbTreeModal.vue')
  453. },
  454. {
  455. path: '/opc',
  456. component: () => import('@/views/opc/Opc.vue')
  457. },
  458. {
  459. path: '/opc/info',
  460. component: () => import('@/views/opc/OpcInfo.vue')
  461. },
  462. {
  463. path: '/toWorkplaceBacklog',
  464. component: () => import('@/views/statisticView/22')
  465. },
  466. {
  467. path: '/InfoBigScreen',
  468. component: () => import('@/views/statisticView/22')
  469. },
  470. {
  471. path: '/InfoDetailBigScreen',
  472. component: () => import('@/views/statisticView/44')
  473. },
  474. {
  475. path: '/RepairBigScreen',
  476. component: () => import('@/views/statisticView/100')
  477. },
  478. {
  479. path: '/SwitchingRoomBigScreen',
  480. component: () => import('@/views/statisticView/SwitchingRoom')
  481. },
  482. {
  483. path: '/TransformerDetailBigScreen',
  484. component: () => import('@/views/statisticView/TransformerDetail')
  485. },
  486. {
  487. path: '/TransformerHistoryBigScreen',
  488. component: () => import('@/views/statisticView/TransformerHistory')
  489. },
  490. {
  491. path: '/DayStatistics',
  492. component: () => import('@/views/statisticView/DayStatistics')
  493. },
  494. {
  495. path: '/MonthStatistics',
  496. component: () => import('@/views/statisticView/MonthStatistics')
  497. },
  498. {
  499. path: '/StoreBigScreen',
  500. component: () => import('@/views/statisticView/9')
  501. },
  502. {
  503. path: '/main',
  504. component: () => import('@/views/statisticView/Main')
  505. },
  506. {
  507. path: '/platformSystem',
  508. component: () => import('@/views/statisticView/PlatformSystem')
  509. },
  510. {
  511. path: '/single/login',
  512. name: 'SingleLogin',
  513. component: () => import('@/views/white-list/SingleLogin'),
  514. meta: {
  515. title: '单点登录',
  516. keepAlive: false,
  517. hiddenHeaderContent: true,
  518. target: null,
  519. permission: ''
  520. },
  521. hidden: true,
  522. hideChildrenInMenu: true
  523. },
  524. {
  525. path: '/result/success',
  526. name: 'ResultSuccess',
  527. component: () => import(/* webpackChunkName: "result" */ '@/views/result/Success'),
  528. meta: {
  529. title: '结果页',
  530. keepAlive: false,
  531. hiddenHeaderContent: true,
  532. target: null,
  533. permission: ''
  534. },
  535. hidden: true,
  536. hideChildrenInMenu: true
  537. }
  538. ]
  539. /**
  540. * 默认菜单
  541. */
  542. const defaultRouter = {
  543. key: 'RootDefault',
  544. path: '/default',
  545. url: '/default',
  546. name: 'default',
  547. component: BasicLayout,
  548. meta: { title: '默认' },
  549. redirect: '/account/settings',
  550. type: 1,
  551. children: [
  552. {
  553. path: '/account/center',
  554. name: 'center',
  555. component: constantRouterComponents['AccountCenter'],
  556. meta: {
  557. title: '个人中心',
  558. keepAlive: false,
  559. hiddenHeaderContent: false,
  560. target: null,
  561. permission: ''
  562. },
  563. hidden: true,
  564. hideChildrenInMenu: true
  565. },
  566. {
  567. path: '/account/settings',
  568. name: 'settings',
  569. component: constantRouterComponents['AccountSettings'],
  570. meta: {
  571. title: '个人设置',
  572. keepAlive: false,
  573. hiddenHeaderContent: true,
  574. target: null,
  575. permission: ''
  576. },
  577. hidden: true,
  578. hideChildrenInMenu: true
  579. }]
  580. }
  581. /**
  582. * 动态生成菜单
  583. * @param token
  584. * @returns {Promise<Router>}
  585. */
  586. export const generatorDynamicRouter = (menus) => {
  587. return new Promise((resolve, reject) => {
  588. try {
  589. const menuNav = []
  590. // 后端数据, 根级树数组, 根级 PID,后端已转为树型 解构
  591. // listToTree(result, childrenNav, 0)
  592. rootRouter.children = menus
  593. menuNav.push(rootRouter)
  594. const routers = generator(menuNav)
  595. routers.push(notFoundRouter)
  596. routers.push(defaultRouter)
  597. resolve(routers)
  598. } catch (e) {
  599. reject(e)
  600. }
  601. })
  602. }
  603. /**
  604. * 格式化树形结构数据 生成 vue-router 层级路由表
  605. *
  606. * @param routerMap
  607. * @param parent
  608. * @returns {*}
  609. */
  610. export const generator = (routerMap, parent) => {
  611. return routerMap.map(itemTree => {
  612. let item = itemTree.item
  613. if (BaseTool.Object.isBlank(item)) {
  614. item = itemTree
  615. }
  616. item.children = itemTree.children
  617. // 如果不是菜单则跳过
  618. if (GlobalConstant.MenuTypeMenu === item.type) {
  619. return null
  620. }
  621. // path: '/dashboard',
  622. // name: 'dashboard',
  623. // redirect: '/dashboard/workplace', // 可以做父路由到子路由的跳转
  624. // component: RouteView,
  625. // meta: { title: '仪表盘', keepAlive: true, icon: bxAnaalyse, permission: [ 'dashboard' ] },
  626. const { title, visible, hideChildren, hiddenHeaderContent, target, icon } = item || {}
  627. const myComponent = constantRouterComponents[item.component || item.name]
  628. const currentRouter = {
  629. // 如果路由设置了 path,则作为默认 path,否则 路由地址 动态拼接生成如 /dashboard/workplace
  630. path: item.url || `${parent && parent.url || ''}/${item.name}`,
  631. // 路由名称,建议唯一
  632. name: item.name,
  633. // 该路由对应页面的 组件 :方案1
  634. component: myComponent,
  635. // 该路由对应页面的 组件 :方案2 (动态加载)
  636. // component: constantRouterComponents[item.component || item.key] || () => import(`@/views/${item.component}`),
  637. // meta: 页面标题, 菜单图标, 页面权限(供指令权限用,可去掉)
  638. meta: { title: title, icon: icon || undefined, keepAlive: false, hiddenHeaderContent: hiddenHeaderContent || false, target: target, permission: item.permission }
  639. }
  640. // 是否设置了隐藏菜单
  641. if (visible === false) {
  642. currentRouter.hidden = true
  643. }
  644. // 是否设置了隐藏子菜单
  645. if (hideChildren || visible === false) {
  646. currentRouter.hideChildrenInMenu = true
  647. }
  648. // 为了防止出现后端返回结果不规范,处理有可能出现拼接出两个 反斜杠
  649. if (!currentRouter.path.startsWith('http')) {
  650. currentRouter.path = currentRouter.path.replace('//', '/')
  651. }
  652. // 重定向
  653. item.redirect && (currentRouter.redirect = item.redirect)
  654. // 是否有子菜单,并递归处理
  655. if (item.children && item.children.length > 0) {
  656. // Recursion
  657. currentRouter.children = generator(item.children, currentRouter)
  658. }
  659. return currentRouter
  660. })
  661. }
  662. /**
  663. * 数组转树形结构
  664. * @param list 源数组
  665. * @param tree 树
  666. * @param parentId 父ID
  667. */
  668. // const listToTree = (list, tree, parentId) => {
  669. // list.forEach(item => {
  670. // // 判断是否为父级菜单
  671. // if (item.parentId === parentId) {
  672. // const child = {
  673. // ...item,
  674. // key: item.key || item.name,
  675. // children: []
  676. // }
  677. // // 迭代 list, 找到当前菜单相符合的所有子菜单
  678. // listToTree(list, child.children, item.id)
  679. // // 删掉不存在 children 值的属性
  680. // if (child.children.length <= 0) {
  681. // delete child.children
  682. // }
  683. // // 加入到树中
  684. // tree.push(child)
  685. // }
  686. // })
  687. // }