.umirc.ts 4.9 KB

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