.umirc.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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: '修改密码',
  93. path: '/safety',
  94. component: './UserCenter',
  95. hideInMenu: true,
  96. },
  97. {
  98. name: '登录',
  99. path: '/login',
  100. component: './Login/index',
  101. layout: false,
  102. },
  103. {
  104. name: '文档管理',
  105. path: '/fileManagement',
  106. component: './FileManagement/index',
  107. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/fileIcon.png',
  108. },
  109. {
  110. name: '合同管理',
  111. path: '/contract-manager',
  112. component: './ContractManager/index',
  113. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/contractIcon.png',
  114. },
  115. // {
  116. // name: '授权管理',
  117. // path: '/permission',
  118. // routes: [
  119. // {
  120. // name: '菜单授权',
  121. // path: '/permission/menu',
  122. // component: './Permission/menu',
  123. // },
  124. // {
  125. // name: '文档管理',
  126. // path: '/permission/file',
  127. // component: './Permission/file',
  128. // },
  129. // ],
  130. // },
  131. {
  132. name: '个人中心',
  133. path: '/profile',
  134. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/profileIcon.png',
  135. routes: [
  136. {
  137. name: '我的申请',
  138. path: '/profile/apply',
  139. component: './Profile/apply',
  140. },
  141. {
  142. name: '我的审批',
  143. path: '/profile/approve',
  144. component: './Profile/approve',
  145. },
  146. {
  147. name: '已审核',
  148. path: '/profile/approved',
  149. component: './Profile/approved',
  150. },
  151. ],
  152. // component: './Profile/index',
  153. // hideInMenu: true,
  154. },
  155. // {
  156. // name: '个人中心',
  157. // path: '/profile',
  158. // component: './Profile/index',
  159. // hideInMenu: true,
  160. // },
  161. {
  162. name: '审批详情',
  163. path: '/profile/:id',
  164. component: './Flow/OaAuditDetail',
  165. hideInMenu: true,
  166. },
  167. {
  168. name: '供应商管理',
  169. path: '/manufacturer',
  170. component: './ManufacturerMng/Firm',
  171. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
  172. },
  173. ],
  174. npmClient: 'yarn',
  175. });