.umirc.ts 3.8 KB

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