.umirc.ts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. name: 'viewport',
  22. content:
  23. 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0',
  24. },
  25. ],
  26. proxy: {
  27. '/api': {
  28. // target: 'http://47.96.12.136:8888/',
  29. target: 'http://47.96.12.136:8788/',
  30. // target: 'http://120.55.44.4:8903/',
  31. // target: 'https://work.greentech.com.cn/',
  32. changeOrigin: true,
  33. },
  34. },
  35. routes: [
  36. {
  37. path: '/',
  38. redirect: '/home/92',
  39. },
  40. {
  41. name: '首页',
  42. path: '/home/:projectId',
  43. component: './Home',
  44. },
  45. {
  46. name: '菜单栏',
  47. path: '/menu/:projectId',
  48. component: './Menu',
  49. },
  50. {
  51. name: '水量监测',
  52. path: '/home/water-amt-mng/:projectId',
  53. component: './Home/WaterAmtMng',
  54. },
  55. {
  56. name: '水质监测',
  57. path: '/home/water-quality-mng/:projectId',
  58. component: './Home/QualityMng',
  59. },
  60. {
  61. name: '能耗监测',
  62. path: '/home/energy/:projectId',
  63. component: './Home/EnergyCostComparison',
  64. },
  65. {
  66. name: '药耗监测',
  67. path: '/home/chem-cost/:projectId',
  68. component: './Home/ChemCostComparison',
  69. },
  70. {
  71. name: '工况管理',
  72. path: '/smart/work/:projectId',
  73. component: './Smart',
  74. },
  75. {
  76. name: '工况评估',
  77. path: '/smart/condition-detection/:projectId',
  78. component: './Smart/ConditionDetection',
  79. },
  80. {
  81. name: '优化任务',
  82. path: '/smart/optimization-tasks/:projectId',
  83. component: './Smart/OptimizationTasks',
  84. },
  85. {
  86. name: '模拟仿真',
  87. path: '/smart/simulate/:projectId',
  88. component: './Smart/Simulate',
  89. },
  90. {
  91. name: '智能管控',
  92. path: '/controller/:projectId',
  93. component: './Controller',
  94. },
  95. {
  96. name: '感知监控',
  97. path: '/controller/hardware/:projectId',
  98. component: './Controller/Hardware',
  99. },
  100. {
  101. name: '设备定位',
  102. path: '/controller/device/:projectId',
  103. component: './Controller/Device',
  104. },
  105. // {
  106. // name: '空调监控',
  107. // path: '/hardware-controller/air-conditioner/:projectId',
  108. // component: './Controller/AirConditioner',
  109. // },
  110. // {
  111. // name: '灯光监控',
  112. // path: '/hardware-controller/light/:projectId',
  113. // component: './Controller/Light',
  114. // },
  115. {
  116. name: '系统自检',
  117. path: '/self-inspection/:projectId',
  118. component: './EqSelfInspection',
  119. },
  120. {
  121. name: '自检列表',
  122. path: '/self-inspection/list/:projectId',
  123. component: './EqSelfInspection/List',
  124. },
  125. {
  126. name: '自检报告',
  127. path: '/self-inspection/detail/:projectId/:routeId',
  128. component: './EqSelfInspection/ReportDetail',
  129. },
  130. {
  131. name: '自检统计',
  132. path: '/self-inspection/statistics/:projectId',
  133. component: './EqSelfInspection/Statistics',
  134. },
  135. {
  136. name: '任务管理',
  137. path: '/task-manage/:projectID',
  138. component: './TaskManage',
  139. },
  140. {
  141. name: '任务列表',
  142. path: '/task-manage/list',
  143. component: './TaskManage/Detail/TaskList/TaskList',
  144. },
  145. {
  146. name: '任务详情',
  147. path: '/task-manage/list/detail',
  148. component: './TaskManage/Detail/TaskDetail/TaskDetail',
  149. },
  150. {
  151. name: '任务关联工单详情',
  152. path: '/task-manage/list/order-detail',
  153. component: './TaskManage/Detail/TaskOrder/TaskOrder',
  154. },
  155. {
  156. name: '消息中心',
  157. path: '/message/:projectId',
  158. component: './MessageCenter',
  159. },
  160. {
  161. name: '设备管理',
  162. path: '/device/:projectId',
  163. component: './DeviceManager',
  164. },
  165. {
  166. name: '出入库管理详情',
  167. path: '/device/detail/:projectId/:type',
  168. component: './DeviceManager/detail',
  169. },
  170. {
  171. name: '备品管理总览',
  172. path: '/device/storage/:projectId',
  173. component: './DeviceManager/storage',
  174. },
  175. {
  176. name: '安全管理',
  177. path: '/safety/:projectId', ///safety management
  178. component: './SafetyManagement',
  179. },
  180. {
  181. name: '门禁日志',
  182. path: '/safety/detail/:projectId', ///safety management
  183. component: './SafetyManagement/doorDetail',
  184. },
  185. // 智慧运营
  186. {
  187. name: '',
  188. path: '/smart-ops/:projectId', ///safety management
  189. component: './SmartOps/index',
  190. },
  191. // 工况分析详情
  192. {
  193. name: '',
  194. path: '/smart-ops/work-analysis-detail/:projectId', ///safety management
  195. component: './SmartOps/WorkAnalysisDetail',
  196. },
  197. // 历史记录
  198. {
  199. name: '',
  200. path: '/smart-ops/history-record/:projectId', ///safety management
  201. component: './SmartOps/HistoryRecord',
  202. },
  203. // 操作记录
  204. {
  205. name: '',
  206. path: '/smart-ops/operation-record/:projectId',
  207. component: './SmartOps/OperationRecord',
  208. },
  209. // 图标弹窗页面
  210. {
  211. name: '',
  212. path: '/smart-ops/chart-page/:projectId',
  213. component: './SmartOps/ChartPage',
  214. },
  215. // 系统工作日报
  216. {
  217. name: '',
  218. path: '/system-daily/:projectId',
  219. component: './SystemDaily/index',
  220. },
  221. //个人中心
  222. {
  223. name: '',
  224. path: '/center/:projectId',
  225. component: './Center/index',
  226. },
  227. //智慧运营报告
  228. {
  229. name: '',
  230. path: '/smart-report/:projectId',
  231. component: './SmartReport/index',
  232. },
  233. ],
  234. npmClient: 'yarn',
  235. });