.umirc.ts 3.6 KB

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