.umirc.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. import { defineConfig } from '@umijs/max';
  2. export default defineConfig({
  3. hash: true,
  4. antd: {},
  5. dva: {},
  6. access: {},
  7. model: {},
  8. initialState: {},
  9. request: {},
  10. layout: {
  11. title: '金科环境数字化管理平台',
  12. locale: false,
  13. },
  14. title: '金科环境数字化管理平台',
  15. publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
  16. proxy: {
  17. '/api': {
  18. // target: 'http://47.96.12.136:8788/',
  19. // target: 'http://47.96.12.136:8895/',
  20. target: 'http://120.55.44.4:8902/',
  21. changeOrigin: true,
  22. },
  23. },
  24. // chainWebpack(config) {
  25. // config.module
  26. // .rule()
  27. // .test(/\.(pdf|svg|docx|doc)$/)
  28. // .use('file-loader?name=[path][name].[ext]')
  29. // .loader('file-loader')
  30. // .end()
  31. // },
  32. routes: [
  33. {
  34. path: '/',
  35. redirect: '/home',
  36. },
  37. {
  38. name: '首页',
  39. path: '/home',
  40. component: './Home/index',
  41. menuRender: false,
  42. },
  43. {
  44. name: '审批流管理',
  45. path: '/flow',
  46. hideChildrenInMenu: true,
  47. routes: [
  48. // {
  49. // path: '/flow',
  50. // redirect: '/flow/list',
  51. // },
  52. {
  53. name: '审批流管理',
  54. path: '/flow',
  55. component: './Flow/index',
  56. },
  57. {
  58. name: '审批流详情',
  59. path: '/flow/audit',
  60. component: './Flow/Audit',
  61. hideInMenu: true,
  62. },
  63. ],
  64. },
  65. {
  66. name: 'OA审批',
  67. path: '/oa',
  68. hideChildrenInMenu: true,
  69. routes: [
  70. {
  71. name: 'OA审批',
  72. path: '/oa',
  73. component: './Flow/Oa',
  74. },
  75. {
  76. name: 'OA详情',
  77. path: '/oa/detail/:oaId',
  78. component: './Flow/OaDetail',
  79. },
  80. ],
  81. },
  82. // {
  83. // name: '权限演示',
  84. // path: '/access',
  85. // component: './Access',
  86. // },
  87. // {
  88. // name: 'CRUD 示例',
  89. // path: '/table',
  90. // component: './Table',
  91. // },
  92. {
  93. name: '登录',
  94. path: '/login',
  95. component: './Login/index',
  96. layout: false,
  97. },
  98. {
  99. name: '文档管理',
  100. path: '/fileManagement',
  101. component: './FileManagement/index',
  102. },
  103. {
  104. name: '合同管理',
  105. path: '/contract-manager',
  106. component: './ContractManager/index',
  107. },
  108. // {
  109. // name: '授权管理',
  110. // path: '/permission',
  111. // routes: [
  112. // {
  113. // name: '菜单授权',
  114. // path: '/permission/menu',
  115. // component: './Permission/menu',
  116. // },
  117. // {
  118. // name: '文档管理',
  119. // path: '/permission/file',
  120. // component: './Permission/file',
  121. // },
  122. // ],
  123. // },
  124. {
  125. name: '个人中心',
  126. path: '/profile',
  127. routes: [
  128. {
  129. name: '我的申请',
  130. path: '/profile/apply',
  131. component: './Profile/apply',
  132. },
  133. {
  134. name: '我的审批',
  135. path: '/profile/approve',
  136. component: './Profile/approve',
  137. },
  138. {
  139. name: '已审核',
  140. path: '/profile/approved',
  141. component: './Profile/approved',
  142. },
  143. ],
  144. // component: './Profile/index',
  145. // hideInMenu: true,
  146. },
  147. // {
  148. // name: '个人中心',
  149. // path: '/profile',
  150. // component: './Profile/index',
  151. // hideInMenu: true,
  152. // },
  153. {
  154. name: '审批详情',
  155. path: '/profile/:id',
  156. component: './Flow/OaAuditDetail',
  157. hideInMenu: true,
  158. },
  159. {
  160. name: '供应商管理',
  161. path: '/manufacturer',
  162. component: './ManufacturerMng/Firm',
  163. },
  164. ],
  165. npmClient: 'yarn',
  166. });