.umirc.ts 3.9 KB

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