.umirc.ts 3.7 KB

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