.umirc.ts 6.3 KB

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