.umirc.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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: '/task-manage/detail',
  79. component: './TaskManage/Detail/TaskDetail',
  80. },
  81. // {
  82. // name: '权限演示',
  83. // path: '/access',
  84. // component: './Access',
  85. // },
  86. // {
  87. // name: ' CRUD 示例',
  88. // path: '/table',
  89. // component: './Table',
  90. // },
  91. ],
  92. npmClient: 'yarn',
  93. });