.umirc.ts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. import { defineConfig } from '@umijs/max';
  2. export default defineConfig({
  3. hash: true,
  4. antd: {},
  5. access: {},
  6. model: {},
  7. initialState: {},
  8. request: {},
  9. dva: {},
  10. layout: false,
  11. // publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
  12. publicPath: '/',
  13. metas: [
  14. // 配置html禁止缓存
  15. { 'http-equiv': 'pragma', content: 'no-cache' },
  16. { 'http-equiv': 'cache-control', content: 'no-cache' },
  17. { 'http-equiv': 'expires', content: '0' },
  18. { 'http-equiv': 'X-UA-Compatible', content: 'IE=EmulateIE9' },
  19. { name: 'transparent', content: 'true' },
  20. ],
  21. proxy: {
  22. '/api': {
  23. // target: 'http://47.96.12.136:8888/',
  24. target: 'http://47.96.12.136:8788/',
  25. // target: 'https://work.greentech.com.cn/',
  26. changeOrigin: true,
  27. },
  28. },
  29. routes: [
  30. {
  31. path: '/',
  32. redirect: '/home/92',
  33. },
  34. {
  35. name: '首页',
  36. path: '/home/:projectId',
  37. component: './Home',
  38. },
  39. {
  40. name: '菜单栏',
  41. path: '/menu/:projectId',
  42. component: './Menu',
  43. },
  44. {
  45. name: '水量监测',
  46. path: '/home/water-amt-mng/:projectId',
  47. component: './Home/WaterAmtMng',
  48. },
  49. {
  50. name: '水质监测',
  51. path: '/home/water-quality-mng/:projectId',
  52. component: './Home/QualityMng',
  53. },
  54. {
  55. name: '能耗监测',
  56. path: '/home/energy/:projectId',
  57. component: './Home/EnergyCostComparison',
  58. },
  59. {
  60. name: '药耗监测',
  61. path: '/home/chem-cost/:projectId',
  62. component: './Home/ChemCostComparison',
  63. },
  64. {
  65. name: '工况管理',
  66. path: '/smart/work/:projectId',
  67. component: './Smart',
  68. },
  69. {
  70. name: '工况评估',
  71. path: '/smart/condition-detection/:projectId',
  72. component: './Smart/ConditionDetection',
  73. },
  74. {
  75. name: '优化任务',
  76. path: '/smart/optimization-tasks/:projectId',
  77. component: './Smart/OptimizationTasks',
  78. },
  79. {
  80. name: '模拟仿真',
  81. path: '/smart/simulate/:projectId',
  82. component: './Smart/Simulate',
  83. },
  84. {
  85. name: '智能管控',
  86. path: '/controller/:projectId',
  87. component: './Controller',
  88. },
  89. {
  90. name: '感知监控',
  91. path: '/controller/hardware/:projectId',
  92. component: './Controller/Hardware',
  93. },
  94. {
  95. name: '设备定位',
  96. path: '/controller/device/:projectId',
  97. component: './Controller/Device',
  98. },
  99. // {
  100. // name: '空调监控',
  101. // path: '/hardware-controller/air-conditioner/:projectId',
  102. // component: './Controller/AirConditioner',
  103. // },
  104. // {
  105. // name: '灯光监控',
  106. // path: '/hardware-controller/light/:projectId',
  107. // component: './Controller/Light',
  108. // },
  109. {
  110. name: '系统自检',
  111. path: '/self-inspection/:projectId',
  112. component: './EqSelfInspection',
  113. },
  114. {
  115. name: '自检列表',
  116. path: '/self-inspection/list/:projectId',
  117. component: './EqSelfInspection/List',
  118. },
  119. {
  120. name: '自检报告',
  121. path: '/self-inspection/detail/:projectId/:routeId',
  122. component: './EqSelfInspection/ReportDetail',
  123. },
  124. {
  125. name: '自检统计',
  126. path: '/self-inspection/statistics/:projectId',
  127. component: './EqSelfInspection/Statistics',
  128. },
  129. {
  130. name: '任务管理',
  131. path: '/task-manage/:projectID',
  132. component: './TaskManage',
  133. },
  134. {
  135. name: '任务列表',
  136. path: '/task-manage/list',
  137. component: './TaskManage/Detail/TaskList/TaskList',
  138. },
  139. {
  140. name: '任务详情',
  141. path: '/task-manage/list/detail',
  142. component: './TaskManage/Detail/TaskDetail/TaskDetail',
  143. },
  144. {
  145. name: '任务关联工单详情',
  146. path: '/task-manage/list/order-detail',
  147. component: './TaskManage/Detail/TaskOrder/TaskOrder',
  148. },
  149. {
  150. name: '消息中心',
  151. path: '/message/:projectId',
  152. component: './MessageCenter',
  153. },
  154. {
  155. name: '设备管理',
  156. path: '/device/:projectId',
  157. component: './DeviceManager',
  158. },
  159. {
  160. name: '出入库管理详情',
  161. path: '/device/detail/:projectId/:type',
  162. component: './DeviceManager/detail',
  163. },
  164. {
  165. name: '备品管理总览',
  166. path: '/device/storage/:projectId',
  167. component: './DeviceManager/storage',
  168. },
  169. {
  170. name: '安全管理',
  171. path: '/safety/:projectId', ///safety management
  172. component: './SafetyManagement',
  173. },
  174. {
  175. name: '门禁日志',
  176. path: '/safety/detail/:projectId', ///safety management
  177. component: './SafetyManagement/doorDetail',
  178. },
  179. // {
  180. // name: '权限演示',
  181. // path: '/access',
  182. // component: './Access',
  183. // },
  184. // {
  185. // name: ' CRUD 示例',
  186. // path: '/table',
  187. // component: './Table',
  188. // },
  189. ],
  190. npmClient: 'yarn',
  191. });