.umirc.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. import { defineConfig } from '@umijs/max';
  2. export default defineConfig({
  3. antd: {},
  4. access: {},
  5. model: {},
  6. initialState: {},
  7. request: {},
  8. dva: {},
  9. layout: false,
  10. // publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
  11. publicPath: '/',
  12. metas: [
  13. // 配置html禁止缓存
  14. { 'http-equiv': 'pragma', content: 'no-cache' },
  15. { 'http-equiv': 'cache-control', content: 'no-cache' },
  16. { 'http-equiv': 'expires', content: '0' },
  17. { 'http-equiv': 'X-UA-Compatible', content: 'IE=EmulateIE9' },
  18. { name: 'transparent', content: 'true' },
  19. ],
  20. proxy: {
  21. '/api': {
  22. // target: 'http://47.96.12.136:8888/',
  23. target: 'http://47.96.12.136:8788/',
  24. // target: 'https://work.greentech.com.cn/',
  25. changeOrigin: true,
  26. },
  27. },
  28. routes: [
  29. {
  30. path: '/',
  31. redirect: '/home/92',
  32. },
  33. {
  34. name: '首页',
  35. path: '/home/:projectId',
  36. component: './Home',
  37. },
  38. {
  39. name: '水量监测',
  40. path: '/home/water-amt-mng/:projectId',
  41. component: './Home/WaterAmtMng',
  42. },
  43. {
  44. name: '水质监测',
  45. path: '/home/water-quality-mng/:projectId',
  46. component: './Home/QualityMng',
  47. },
  48. {
  49. name: '能耗监测',
  50. path: '/home/energy/:projectId',
  51. component: './Home/EnergyCostComparison',
  52. },
  53. {
  54. name: '药耗监测',
  55. path: '/home/chem-cost/:projectId',
  56. component: './Home/ChemCostComparison',
  57. },
  58. {
  59. name: '工况管理',
  60. path: '/smart/work/:projectId',
  61. component: './Smart',
  62. },
  63. {
  64. name: '工况评估',
  65. path: '/smart/condition-detection/:projectId',
  66. component: './Smart/ConditionDetection',
  67. },
  68. {
  69. name: '优化任务',
  70. path: '/smart/optimization-tasks/:projectId',
  71. component: './Smart/OptimizationTasks',
  72. },
  73. {
  74. name: '模拟仿真',
  75. path: '/smart/simulate/:projectId',
  76. component: './Smart/Simulate',
  77. },
  78. {
  79. name: '空调监控',
  80. path: '/hardware-controller/air-conditioner/:projectId',
  81. component: './HardwareController/AirConditioner',
  82. },
  83. {
  84. name: '空调监控',
  85. path: '/hardware-controller/light/:projectId',
  86. component: './HardwareController/Light',
  87. },
  88. {
  89. name: '系统自检',
  90. path: '/self-inspection/:projectId',
  91. component: './EqSelfInspection',
  92. },
  93. {
  94. name: '自检列表',
  95. path: '/self-inspection/list/:projectId',
  96. component: './EqSelfInspection/List',
  97. },
  98. {
  99. name: '自检报告',
  100. path: '/self-inspection/detail/:projectId/:routeId',
  101. component: './EqSelfInspection/ReportDetail',
  102. },
  103. {
  104. name: '自检统计',
  105. path: '/self-inspection/statistics/:projectId',
  106. component: './EqSelfInspection/Statistics',
  107. },
  108. {
  109. name: '任务管理',
  110. path: '/task-manage/:projectID',
  111. component: './TaskManage',
  112. },
  113. {
  114. name: '消息中心',
  115. path: '/message/:projectId',
  116. component: './MessageCenter',
  117. },
  118. {
  119. name: '消息中心',
  120. path: '/device/:projectId',
  121. component: './DeviceManager',
  122. },
  123. {
  124. name: '任务管理-详情',
  125. path: '/task-manage/detail',
  126. component: './TaskManage/Detail/TaskDetail',
  127. },
  128. // {
  129. // name: '权限演示',
  130. // path: '/access',
  131. // component: './Access',
  132. // },
  133. // {
  134. // name: ' CRUD 示例',
  135. // path: '/table',
  136. // component: './Table',
  137. // },
  138. ],
  139. npmClient: 'yarn',
  140. });