.umirc.ts 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. import { defineConfig } from '@umijs/max';
  2. import locale from 'antd/es/calendar/locale/zh_CN';
  3. import moment from 'moment';
  4. moment.locale('zh-cn');
  5. export default defineConfig({
  6. hash: true,
  7. antd: {},
  8. dva: {},
  9. access: {},
  10. model: {},
  11. initialState: {},
  12. request: {},
  13. layout: {
  14. title: '金科环境数字化管理平台',
  15. locale: false,
  16. },
  17. locale: {
  18. antd: true, // 如果项目依赖中包含 `antd`,则默认为 true
  19. baseNavigator: true,
  20. baseSeparator: '-',
  21. default: 'zh-CN',
  22. title: false,
  23. useLocalStorage: true,
  24. },
  25. title: '金科环境数字化管理平台',
  26. publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
  27. proxy: {
  28. '/api': {
  29. // target: 'http://47.96.12.136:8888/',
  30. target: 'http://47.96.12.136:8895/',
  31. // target: 'http://120.55.44.4:8902/',
  32. changeOrigin: true,
  33. },
  34. },
  35. // chainWebpack(config) {
  36. // config.module
  37. // .rule()
  38. // .test(/\.(pdf|svg|docx|doc)$/)
  39. // .use('file-loader?name=[path][name].[ext]')
  40. // .loader('file-loader')
  41. // .end()
  42. // },
  43. routes: [
  44. {
  45. path: '/',
  46. redirect: '/home',
  47. },
  48. {
  49. name: '首页',
  50. path: '/home',
  51. component: './Home/index',
  52. menuRender: false,
  53. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/homeIcon.png',
  54. },
  55. {
  56. name: '审批流管理',
  57. path: '/flow',
  58. access: 'isAdmin',
  59. hideChildrenInMenu: true,
  60. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/flowIcon.png',
  61. routes: [
  62. // {
  63. // path: '/flow',
  64. // redirect: '/flow/list',
  65. // },
  66. {
  67. name: '审批流管理',
  68. path: '/flow',
  69. component: './Flow/index',
  70. },
  71. {
  72. name: '审批流详情',
  73. path: '/flow/audit',
  74. component: './Flow/Audit',
  75. hideInMenu: true,
  76. },
  77. ],
  78. },
  79. {
  80. name: 'OA审批',
  81. path: '/oa',
  82. hideChildrenInMenu: true,
  83. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/oaIcon.png',
  84. routes: [
  85. {
  86. name: 'OA审批',
  87. path: '/oa',
  88. component: './Flow/Oa',
  89. },
  90. {
  91. name: 'OA详情',
  92. path: '/oa/detail/:oaId',
  93. component: './Flow/OaDetail',
  94. },
  95. ],
  96. },
  97. // {
  98. // name: '权限演示',
  99. // path: '/access',
  100. // component: './Access',
  101. // },
  102. // {
  103. // name: 'CRUD 示例',
  104. // path: '/table',
  105. // component: './Table',
  106. // },
  107. {
  108. name: '登录',
  109. path: '/login',
  110. component: './Login/index',
  111. layout: false,
  112. },
  113. {
  114. name: '文档管理',
  115. path: '/fileManagement',
  116. component: './FileManagement/index',
  117. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/fileIcon.png',
  118. },
  119. {
  120. name: '合同管理',
  121. path: '/contract-manager',
  122. component: './ContractManager/index',
  123. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/contractIcon.png',
  124. },
  125. // {
  126. // name: '授权管理',
  127. // path: '/permission',
  128. // routes: [
  129. // {
  130. // name: '菜单授权',
  131. // path: '/permission/menu',
  132. // component: './Permission/menu',
  133. // },
  134. // {
  135. // name: '文档管理',
  136. // path: '/permission/file',
  137. // component: './Permission/file',
  138. // },
  139. // ],
  140. // },
  141. {
  142. name: '个人中心',
  143. path: '/profile',
  144. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/profileIcon.png',
  145. routes: [
  146. {
  147. name: '我的申请',
  148. path: '/profile/apply',
  149. component: './Profile/apply',
  150. },
  151. {
  152. name: '我的审批',
  153. path: '/profile/approve',
  154. component: './Profile/approve',
  155. },
  156. {
  157. name: '已审核',
  158. path: '/profile/approved',
  159. component: './Profile/approved',
  160. },
  161. ],
  162. // component: './Profile/index',
  163. // hideInMenu: true,
  164. },
  165. // {
  166. // name: '个人中心',
  167. // path: '/profile',
  168. // component: './Profile/index',
  169. // hideInMenu: true,
  170. // },
  171. {
  172. name: '审批详情',
  173. path: '/profile/:id',
  174. component: './Flow/OaAuditDetail',
  175. hideInMenu: true,
  176. },
  177. {
  178. name: '供应商管理',
  179. path: '/manufacturer',
  180. component: './ManufacturerMng/Firm',
  181. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
  182. },
  183. {
  184. name: '人日立项',
  185. path: '/work-hours',
  186. component: './PurchaseList/WorkingHours/index',
  187. icon: 'https://gt-digitization.oss-cn-hangzhou.aliyuncs.com/doc/department/2023-04/manufacturerIcon.png',
  188. },
  189. ],
  190. npmClient: 'yarn',
  191. });