.umirc.ts 3.9 KB

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