.umirc.ts 6.2 KB

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