.umirc.ts 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. import { defineConfig } from '@umijs/max';
  2. const publicPath = process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/';
  3. export default defineConfig({
  4. hash: true,
  5. antd: {},
  6. access: {},
  7. model: {},
  8. initialState: {},
  9. request: {},
  10. dva: {},
  11. layout: false,
  12. // publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
  13. publicPath: '/',
  14. metas: [
  15. // 配置html禁止缓存
  16. { 'http-equiv': 'pragma', content: 'no-cache' },
  17. { 'http-equiv': 'cache-control', content: 'no-cache' },
  18. { 'http-equiv': 'expires', content: '0' },
  19. { 'http-equiv': 'X-UA-Compatible', content: 'IE=EmulateIE9' },
  20. { name: 'transparent', content: 'true' },
  21. {
  22. name: 'viewport',
  23. content:
  24. 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0',
  25. },
  26. ],
  27. headScripts: [`${publicPath}rem.js`],
  28. proxy: {
  29. '/api': {
  30. // target: 'http://47.96.12.136:8888/',
  31. target: 'http://47.96.12.136:8788/',
  32. // target: 'http://120.55.44.4:8903/',
  33. // target: 'https://work.greentech.com.cn/',
  34. changeOrigin: true,
  35. },
  36. },
  37. routes: [
  38. {
  39. path: '/',
  40. redirect: '/home/92',
  41. },
  42. {
  43. name: '首页',
  44. path: '/home/:projectId',
  45. component: './Home',
  46. },
  47. {
  48. name: '项目选择',
  49. path: '/projects/:projectId',
  50. component: './Projects',
  51. },
  52. {
  53. name: '菜单栏',
  54. path: '/menu/:projectId',
  55. component: './Menu',
  56. },
  57. {
  58. name: '水量监测',
  59. path: '/home/water-amt-mng/:projectId',
  60. component: './Home/WaterAmtMng',
  61. },
  62. {
  63. name: '水质监测',
  64. path: '/home/water-quality-mng/:projectId',
  65. component: './Home/QualityMng',
  66. },
  67. {
  68. name: '能耗监测',
  69. path: '/home/energy/:projectId',
  70. component: './Home/EnergyCostComparison',
  71. },
  72. {
  73. name: '药耗监测',
  74. path: '/home/chem-cost/:projectId',
  75. component: './Home/ChemCostComparison',
  76. },
  77. {
  78. name: '工况管理',
  79. path: '/smart/work/:projectId',
  80. component: './Smart',
  81. },
  82. {
  83. name: '工况评估',
  84. path: '/smart/condition-detection/:projectId',
  85. component: './Smart/ConditionDetection',
  86. },
  87. {
  88. name: '优化任务',
  89. path: '/smart/optimization-tasks/:projectId',
  90. component: './Smart/OptimizationTasks',
  91. },
  92. {
  93. name: '模拟仿真',
  94. path: '/smart/simulate/:projectId',
  95. component: './Smart/Simulate',
  96. },
  97. {
  98. name: '智能管控',
  99. path: '/controller/:projectId',
  100. component: './Controller',
  101. },
  102. {
  103. name: '感知监控',
  104. path: '/controller/hardware/:projectId',
  105. component: './Controller/Hardware',
  106. },
  107. {
  108. name: '设备定位',
  109. path: '/controller/device/:projectId',
  110. component: './Controller/Device',
  111. },
  112. // {
  113. // name: '空调监控',
  114. // path: '/hardware-controller/air-conditioner/:projectId',
  115. // component: './Controller/AirConditioner',
  116. // },
  117. // {
  118. // name: '灯光监控',
  119. // path: '/hardware-controller/light/:projectId',
  120. // component: './Controller/Light',
  121. // },
  122. {
  123. name: '系统自检',
  124. path: '/self-inspection/:projectId',
  125. component: './EqSelfInspection',
  126. },
  127. {
  128. name: '自检列表',
  129. path: '/self-inspection/list/:projectId',
  130. component: './EqSelfInspection/List',
  131. },
  132. {
  133. name: '自检报告',
  134. path: '/self-inspection/detail/:projectId/:routeId',
  135. component: './EqSelfInspection/ReportDetail',
  136. },
  137. {
  138. name: '自检统计',
  139. path: '/self-inspection/statistics/:projectId',
  140. component: './EqSelfInspection/Statistics',
  141. },
  142. {
  143. name: '任务管理 - 工单管理',
  144. path: '/task-manage/:projectID',
  145. component: './TaskManage',
  146. },
  147. {
  148. name: '任务列表',
  149. path: '/task-manage/list',
  150. component: './TaskManage/Detail/TaskList/TaskList',
  151. },
  152. {
  153. name: '任务详情',
  154. path: '/task-manage/list/detail',
  155. component: './TaskManage/Detail/TaskDetail/TaskDetail',
  156. },
  157. {
  158. name: '工单列表',
  159. path: '/task-manage/work-order/list',
  160. component: './TaskManage/Detail/WorkOrderList/WorkOrderList',
  161. },
  162. {
  163. name: '任务关联工单详情',
  164. path: '/task-manage/list/order-detail',
  165. component: './TaskManage/Detail/TaskOrder/TaskOrder',
  166. },
  167. {
  168. name: '任务弹窗',
  169. path: '/task-manage/pop/:projectID',
  170. component: './TaskManage/Popup',
  171. },
  172. {
  173. name: '工单详情弹窗',
  174. path: '/task-manage/pop/work-order/:projectID',
  175. component: './TaskManage/Popup/WorkOrderModal',
  176. },
  177. {
  178. name: '消息中心',
  179. path: '/message/:projectId',
  180. component: './MessageCenter',
  181. },
  182. {
  183. name: '设备管理',
  184. path: '/device/:projectId',
  185. component: './DeviceManager',
  186. },
  187. {
  188. name: '出入库管理详情',
  189. path: '/device/detail/:projectId/:type',
  190. component: './DeviceManager/detail',
  191. },
  192. {
  193. name: '备品管理总览',
  194. path: '/device/storage/:projectId',
  195. component: './DeviceManager/storage',
  196. },
  197. {
  198. name: '安全管理',
  199. path: '/safety/:projectId', ///safety management
  200. component: './SafetyManagement',
  201. },
  202. // 视频图片预览
  203. {
  204. path: '/alarm/preview',
  205. name: '',
  206. component: './Alarm/Preview',
  207. },
  208. {
  209. name: '门禁日志',
  210. path: '/safety/detail/:projectId', ///safety management
  211. component: './SafetyManagement/doorDetail',
  212. },
  213. // 智慧运营
  214. {
  215. name: '',
  216. path: '/smart-ops/:projectId', ///safety management
  217. component: './SmartOps/index',
  218. },
  219. // 工况分析详情
  220. {
  221. name: '',
  222. path: '/smart-ops/work-analysis-detail/:projectId', ///safety management
  223. component: './SmartOps/WorkAnalysisDetail',
  224. },
  225. // 历史记录
  226. {
  227. name: '',
  228. path: '/smart-ops/history-record/:projectId', ///safety management
  229. component: './SmartOps/HistoryRecord',
  230. },
  231. // 操作记录
  232. {
  233. name: '',
  234. path: '/smart-ops/operation-record/:projectId',
  235. component: './SmartOps/OperationRecord',
  236. },
  237. // 图标弹窗页面
  238. {
  239. name: '',
  240. path: '/smart-ops/chart-page/:projectId',
  241. component: './SmartOps/ChartPage',
  242. },
  243. // 系统工作日报
  244. {
  245. name: '',
  246. path: '/system-daily/:projectId',
  247. component: './SystemDaily/index',
  248. },
  249. //个人中心
  250. {
  251. name: '个人中心',
  252. path: '/center/:projectId',
  253. component: './Center/index',
  254. },
  255. {
  256. name: '我的任务',
  257. path: '/center/my-task/:projectId',
  258. component: './Center/MyTask',
  259. },
  260. {
  261. name: '我的任务列表',
  262. path: '/center/my-task/task-list',
  263. component: './Center/MyTask/List/TaskList',
  264. },
  265. {
  266. name: '我的工单列表',
  267. path: '/center/my-task/work-order-list',
  268. component: './Center/MyTask/List/WorkOrderList',
  269. },
  270. {
  271. name: '我的任务详情',
  272. path: '/center/my-task/task-detail',
  273. component: './Center/MyTask/Detail/TaskDetail',
  274. },
  275. {
  276. name: '我的工单详情',
  277. path: '/center/my-task/work-order-detail',
  278. component: './Center/MyTask/Detail/WorkOrderDetail',
  279. },
  280. //智慧运营报告
  281. {
  282. name: '',
  283. path: '/smart-report/:projectId',
  284. component: './SmartReport/index',
  285. },
  286. ],
  287. npmClient: 'yarn',
  288. });