.umirc.ts 4.7 KB

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