.umirc.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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:8888/',
  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. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/homeIcon.png',
  43. },
  44. {
  45. name: '审批流管理',
  46. path: '/flow',
  47. access: 'isAdmin',
  48. hideChildrenInMenu: true,
  49. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/flowIcon.png',
  50. routes: [
  51. // {
  52. // path: '/flow',
  53. // redirect: '/flow/list',
  54. // },
  55. {
  56. name: '审批流管理',
  57. path: '/flow',
  58. component: './Flow/index',
  59. },
  60. {
  61. name: '审批流详情',
  62. path: '/flow/audit',
  63. component: './Flow/Audit',
  64. hideInMenu: true,
  65. },
  66. ],
  67. },
  68. {
  69. name: 'OA审批',
  70. path: '/oa',
  71. hideChildrenInMenu: true,
  72. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/oaIcon.png',
  73. routes: [
  74. {
  75. name: 'OA审批',
  76. path: '/oa',
  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. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/fileIcon.png',
  107. },
  108. {
  109. name: '合同管理',
  110. path: '/contract-manager',
  111. component: './ContractManager/index',
  112. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/contractIcon.png',
  113. },
  114. // {
  115. // name: '授权管理',
  116. // path: '/permission',
  117. // routes: [
  118. // {
  119. // name: '菜单授权',
  120. // path: '/permission/menu',
  121. // component: './Permission/menu',
  122. // },
  123. // {
  124. // name: '文档管理',
  125. // path: '/permission/file',
  126. // component: './Permission/file',
  127. // },
  128. // ],
  129. // },
  130. {
  131. name: '个人中心',
  132. path: '/profile',
  133. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/profileIcon.png',
  134. routes: [
  135. {
  136. name: '我的申请',
  137. path: '/profile/apply',
  138. component: './Profile/apply',
  139. },
  140. {
  141. name: '我的审批',
  142. path: '/profile/approve',
  143. component: './Profile/approve',
  144. },
  145. {
  146. name: '已审核',
  147. path: '/profile/approved',
  148. component: './Profile/approved',
  149. },
  150. ],
  151. // component: './Profile/index',
  152. // hideInMenu: true,
  153. },
  154. // {
  155. // name: '个人中心',
  156. // path: '/profile',
  157. // component: './Profile/index',
  158. // hideInMenu: true,
  159. // },
  160. {
  161. name: '审批详情',
  162. path: '/profile/:id',
  163. component: './Flow/OaAuditDetail',
  164. hideInMenu: true,
  165. },
  166. {
  167. name: '供应商管理',
  168. path: '/manufacturer',
  169. component: './ManufacturerMng/Firm',
  170. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
  171. },
  172. ],
  173. npmClient: 'yarn',
  174. });