.umirc.ts 5.7 KB

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