.umirc.ts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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: '/profile',
  148. component: './Profile/index',
  149. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/profileIcon.png',
  150. },
  151. {
  152. name: '审批详情',
  153. path: '/profile/detail',
  154. component: './Flow/OaAuditDetail',
  155. hideInMenu: true,
  156. },
  157. {
  158. name: '供应商管理',
  159. path: '/manufacturer',
  160. component: './ManufacturerMng/Firm',
  161. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
  162. },
  163. {
  164. name: 'PSR管理',
  165. path: '/psrManage',
  166. component: './PSRManage',
  167. icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-06-20/25bf2fa5-f340-4f9b-8a13-ad50086aedbb.png',
  168. },
  169. {
  170. name: 'PSR详情',
  171. path: '/psrManage/detail/:id',
  172. component: './PSRManage/detail',
  173. hideInMenu: true,
  174. },
  175. {
  176. name: 'CAD实例',
  177. path: '/cad',
  178. component: './Cad',
  179. icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-07-31/3f72fccf-4f9c-4891-a6ec-f04fe4b1d9a2.png',
  180. },
  181. {
  182. name: 'CAD详情',
  183. path: '/cad/detail',
  184. component: './Cad/detail',
  185. hideInMenu: true,
  186. },
  187. {
  188. name: 'Scada功能',
  189. path: '/scada',
  190. access: 'scada',
  191. component: './Scada',
  192. icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/doc/contract/2023-11-24/27866151-5691-487d-8c58-5b4ae995395e.png',
  193. },
  194. {
  195. name: 'GreenGPT',
  196. path: '/gpt',
  197. component: './GreenGPT',
  198. icon: 'https://water-service-test.oss-cn-hangzhou.aliyuncs.com/public/chart-template/icon-gpt.png',
  199. },
  200. ],
  201. npmClient: 'yarn',
  202. });