.umirc.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. ],
  18. proxy: {
  19. '/api': {
  20. // target: 'http://47.96.12.136:8888/',
  21. target: 'http://47.96.12.136:8788/',
  22. // target: 'https://work.greentech.com.cn/',
  23. changeOrigin: true,
  24. },
  25. },
  26. routes: [
  27. {
  28. path: '/',
  29. redirect: '/home',
  30. },
  31. {
  32. name: '首页',
  33. path: '/home',
  34. component: './Home',
  35. },
  36. {
  37. name: '工况管理',
  38. path: '/smart/work/:projectId',
  39. component: './Smart',
  40. },
  41. {
  42. name: '工况评估',
  43. path: '/smart/condition-detection/:projectId',
  44. component: './Smart/ConditionDetection',
  45. },
  46. {
  47. name: '优化任务',
  48. path: '/smart/optimization-tasks/:projectId',
  49. component: './Smart/OptimizationTasks',
  50. },
  51. {
  52. name: '模拟仿真',
  53. path: '/smart/simulate/:projectId',
  54. component: './Smart/Simulate',
  55. },
  56. {
  57. name: '系统自检',
  58. path: '/self-inspection/:projectId',
  59. component: './EqSelfInspection',
  60. },
  61. {
  62. name: '自检报告',
  63. path: '/self-inspection/detail/:projectId/:routeId',
  64. component: './EqSelfInspection/ReportDetail',
  65. },
  66. {
  67. name: '自检统计',
  68. path: '/self-inspection/statistics/:projectId',
  69. component: './EqSelfInspection/Statistics',
  70. },
  71. {
  72. name: '任务管理',
  73. path: '/task-manage/:projectId',
  74. component: './TaskManage',
  75. },
  76. {
  77. name: '消息中心',
  78. path: '/message/:projectId',
  79. component: './MessageCenter',
  80. },
  81. {
  82. name: '消息中心',
  83. path: '/device/:projectId',
  84. component: './DeviceManager',
  85. },
  86. // {
  87. // name: '权限演示',
  88. // path: '/access',
  89. // component: './Access',
  90. // },
  91. // {
  92. // name: ' CRUD 示例',
  93. // path: '/table',
  94. // component: './Table',
  95. // },
  96. ],
  97. npmClient: 'yarn',
  98. });