.umirc.ts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. links: [
  17. {
  18. href: 'stylesheet',
  19. rel: 'http://localhost:3000/plugins/css/pluginsCss.css',
  20. },
  21. { href: 'stylesheet', rel: 'http://localhost:3000/plugins/plugins.css' },
  22. { href: 'stylesheet', rel: 'http://localhost:3000/css/luckysheet.css' },
  23. {
  24. href: 'stylesheet',
  25. rel: 'http://localhost:3000/assets/iconfont/iconfont.css',
  26. },
  27. ],
  28. scripts: [
  29. { src: 'http://localhost:3000/plugins/js/plugin.js' },
  30. { src: 'http://localhost:3000/luckysheet.umd.js' },
  31. ],
  32. proxy: {
  33. '/api': {
  34. // target: 'http://47.96.12.136:8888/',
  35. target: 'http://47.96.12.136:8895/',
  36. // target: 'http://120.55.44.4:8902/',
  37. changeOrigin: true,
  38. },
  39. },
  40. // chainWebpack(config) {
  41. // config.module
  42. // .rule()
  43. // .test(/\.(pdf|svg|docx|doc)$/)
  44. // .use('file-loader?name=[path][name].[ext]')
  45. // .loader('file-loader')
  46. // .end()
  47. // },
  48. routes: [
  49. {
  50. path: '/',
  51. redirect: '/home',
  52. },
  53. {
  54. name: '首页',
  55. path: '/home',
  56. component: './Home/index',
  57. menuRender: false,
  58. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/homeIcon.png',
  59. },
  60. {
  61. name: '审批流管理',
  62. path: '/flow',
  63. access: 'isAdmin',
  64. hideChildrenInMenu: true,
  65. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/flowIcon.png',
  66. routes: [
  67. // {
  68. // path: '/flow',
  69. // redirect: '/flow/list',
  70. // },
  71. {
  72. name: '审批流管理',
  73. path: '/flow',
  74. component: './Flow/index',
  75. },
  76. {
  77. name: '审批流详情',
  78. path: '/flow/audit',
  79. component: './Flow/Audit',
  80. hideInMenu: true,
  81. },
  82. ],
  83. },
  84. {
  85. name: 'OA审批',
  86. path: '/oa',
  87. hideChildrenInMenu: true,
  88. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/oaIcon.png',
  89. routes: [
  90. {
  91. name: 'OA审批',
  92. path: '/oa',
  93. component: './Flow/Oa',
  94. },
  95. {
  96. name: 'OA详情',
  97. path: '/oa/detail/:oaId',
  98. component: './Flow/OaDetail',
  99. },
  100. ],
  101. },
  102. // {
  103. // name: '权限演示',
  104. // path: '/access',
  105. // component: './Access',
  106. // },
  107. {
  108. name: '修改密码',
  109. path: '/safety',
  110. component: './UserCenter',
  111. hideInMenu: true,
  112. },
  113. {
  114. name: '登录',
  115. path: '/login',
  116. component: './Login/index',
  117. layout: false,
  118. },
  119. {
  120. name: '文档管理',
  121. path: '/fileManagement',
  122. component: './FileManagement/index',
  123. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/fileIcon.png',
  124. },
  125. {
  126. name: '合同管理',
  127. path: '/contract-manager',
  128. component: './ContractManager/index',
  129. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/contractIcon.png',
  130. },
  131. // {
  132. // name: '授权管理',
  133. // path: '/permission',
  134. // routes: [
  135. // {
  136. // name: '菜单授权',
  137. // path: '/permission/menu',
  138. // component: './Permission/menu',
  139. // },
  140. // {
  141. // name: '文档管理',
  142. // path: '/permission/file',
  143. // component: './Permission/file',
  144. // },
  145. // ],
  146. // },
  147. {
  148. name: '个人中心',
  149. path: '/profile',
  150. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/profileIcon.png',
  151. routes: [
  152. {
  153. name: '我的申请',
  154. path: '/profile/apply',
  155. component: './Profile/apply',
  156. },
  157. {
  158. name: '我的审批',
  159. path: '/profile/approve',
  160. component: './Profile/approve',
  161. },
  162. {
  163. name: '已审核',
  164. path: '/profile/approved',
  165. component: './Profile/approved',
  166. },
  167. ],
  168. // component: './Profile/index',
  169. // hideInMenu: true,
  170. },
  171. // {
  172. // name: '个人中心',
  173. // path: '/profile',
  174. // component: './Profile/index',
  175. // hideInMenu: true,
  176. // },
  177. {
  178. name: '审批详情',
  179. path: '/profile/:id',
  180. component: './Flow/OaAuditDetail',
  181. hideInMenu: true,
  182. },
  183. {
  184. name: '供应商管理',
  185. path: '/manufacturer',
  186. component: './ManufacturerMng/Firm',
  187. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
  188. },
  189. {
  190. name: 'PSR管理',
  191. path: '/psrManage',
  192. component: './PSRManage',
  193. icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-06-20/25bf2fa5-f340-4f9b-8a13-ad50086aedbb.png',
  194. },
  195. {
  196. name: 'PSR详情',
  197. path: '/psrManage/detail/:id',
  198. component: './PSRManage/detail',
  199. hideInMenu: true,
  200. },
  201. ],
  202. npmClient: 'yarn',
  203. });