.umirc.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. layout: 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/list',
  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. path: '/oa',
  72. redirect: '/oa/list',
  73. },
  74. {
  75. name: 'OA审批',
  76. path: '/oa/list',
  77. component: './Flow/Oa',
  78. },
  79. {
  80. name: 'OA详情',
  81. path: '/oa/detail/:oaId',
  82. component: './Flow/OaDetail',
  83. },
  84. ],
  85. },
  86. // {
  87. // name: '权限演示',
  88. // path: '/access',
  89. // component: './Access',
  90. // },
  91. // {
  92. // name: 'CRUD 示例',
  93. // path: '/table',
  94. // component: './Table',
  95. // },
  96. {
  97. name: '登录',
  98. path: '/login',
  99. component: './Login/index',
  100. layout: false,
  101. },
  102. {
  103. name: '文档管理',
  104. path: '/fileManagement',
  105. component: './FileManagement/index',
  106. },
  107. {
  108. name: '合同管理',
  109. path: '/contract-manager',
  110. component: './ContractManager/index',
  111. },
  112. // {
  113. // name: '授权管理',
  114. // path: '/permission',
  115. // routes: [
  116. // {
  117. // name: '菜单授权',
  118. // path: '/permission/menu',
  119. // component: './Permission/menu',
  120. // },
  121. // {
  122. // name: '文档管理',
  123. // path: '/permission/file',
  124. // component: './Permission/file',
  125. // },
  126. // ],
  127. // },
  128. {
  129. name: '个人中心',
  130. path: '/profile',
  131. routes: [
  132. {
  133. name: '我的申请',
  134. path: '/profile/apply',
  135. component: './Profile/apply',
  136. },
  137. {
  138. name: '我的审批',
  139. path: '/profile/approve',
  140. component: './Profile/approve',
  141. },
  142. {
  143. name: '已审核',
  144. path: '/profile/approved',
  145. component: './Profile/approved',
  146. },
  147. ],
  148. // component: './Profile/index',
  149. // hideInMenu: true,
  150. },
  151. // {
  152. // name: '个人中心',
  153. // path: '/profile',
  154. // component: './Profile/index',
  155. // hideInMenu: true,
  156. // },
  157. {
  158. name: '审批详情',
  159. path: '/profile/:id',
  160. component: './Flow/OaAuditDetail',
  161. hideInMenu: true,
  162. },
  163. {
  164. name: '供应商管理',
  165. path: '/manufacturer',
  166. component: './ManufacturerMng/Firm',
  167. },
  168. ],
  169. npmClient: 'yarn',
  170. });