.umirc.ts 3.1 KB

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