config.ts 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:04:20
  4. * @LastEditTime: 2024-12-03 11:09:39
  5. * @LastEditors: code4eat awesomedema@gmail.com
  6. * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  7. * @FilePath: /KC-MiddlePlatform/config/config.ts
  8. */
  9. import { defineConfig } from 'umi';
  10. import proxy from './proxy';
  11. const { REACT_APP_ENV } = process.env;
  12. export default defineConfig({
  13. hash:true,
  14. nodeModulesTransform: {
  15. type: 'none',
  16. },
  17. title: false,
  18. publicPath: '/',
  19. dva: {
  20. immer: true,
  21. hmr: true,
  22. },
  23. antd: {
  24. config: {
  25. prefixCls: 'kcmp-ant',
  26. // getPopupContainer:(triggerNode:HTMLElement)=>triggerNode
  27. },
  28. },
  29. lessLoader: {
  30. modifyVars: { '@ant-prefix': 'kcmp-ant', 'root-entry-name': 'default' },
  31. },
  32. theme: {
  33. '@primary-color': '#3376FE',
  34. '@primary-color-hover': '#3376FE',
  35. // '@root-entry-name':'root-entry-name'
  36. },
  37. routes: [
  38. {
  39. path: '/',
  40. component: '@/layouts/index.tsx',
  41. routes: [
  42. {
  43. path: '/app1',
  44. microApp: 'app1',
  45. // access: 'canVisitThisApp'
  46. microAppProps: {
  47. autoSetLoading: true,
  48. autoCaptureError: true,
  49. },
  50. },
  51. // {
  52. // path: '/costMana',
  53. // microApp: 'costMana',
  54. // },
  55. {
  56. path: '/PFMBackC',
  57. microApp: 'PFMBackC',
  58. microAppProps: {
  59. autoSetLoading: true,
  60. autoCaptureError: true,
  61. },
  62. },
  63. {
  64. path: '/reviewMana',
  65. microApp: 'reviewMana',
  66. microAppProps: {
  67. autoSetLoading: true,
  68. autoCaptureError: true,
  69. },
  70. },
  71. {
  72. path: '/budgetManaSystem',
  73. microApp: 'budgetManaSystem',
  74. microAppProps: {
  75. // autoSetLoading: true,
  76. autoCaptureError: true,
  77. },
  78. },
  79. {
  80. path: '/pfmBackMana',
  81. microApp: 'pfmBackMana',
  82. microAppProps: {
  83. autoSetLoading: true,
  84. autoCaptureError: true,
  85. },
  86. },
  87. {
  88. path: '/CostAccountingSys',
  89. microApp: 'CostAccountingSys',
  90. microAppProps: {
  91. autoCaptureError: true,
  92. //loader: (loading:boolean) => <div>loading</div>,
  93. },
  94. },
  95. {
  96. path: '/MediResourceManaSys',
  97. microApp: 'MediResourceManaSys',
  98. microAppProps: {
  99. autoCaptureError: true,
  100. //loader: (loading:boolean) => <div>loading</div>,
  101. },
  102. },
  103. {
  104. path: '/MedicalWisdomCheckSys',
  105. microApp: 'MedicalWisdomCheckSys',
  106. microAppProps: {
  107. autoCaptureError: true,
  108. //loader: (loading:boolean) => <div>loading</div>,
  109. },
  110. },
  111. {
  112. path: '/devServer',
  113. microApp: 'devServer',
  114. microAppProps: {
  115. autoCaptureError: true,
  116. //loader: (loading:boolean) => <div>loading</div>,
  117. },
  118. },
  119. {
  120. path: '/personnelManaSystem',
  121. microApp: 'personnelManaSystem',
  122. microAppProps: {
  123. autoCaptureError: true,
  124. //loader: (loading:boolean) => <div>loading</div>,
  125. },
  126. },
  127. {
  128. path: '/nursingWorkersManaSystem',
  129. microApp: 'nursingWorkersManaSystem',
  130. microAppProps: {
  131. autoCaptureError: true,
  132. //loader: (loading:boolean) => <div>loading</div>,
  133. },
  134. },
  135. {
  136. path: '/channelIndex/channelIndexOne',
  137. component: '@/pages/channelIndex/channelIndexOne/index.tsx',
  138. },
  139. {
  140. path: '/index',
  141. title: '欢迎进入医管平台',
  142. component: '@/pages/index/index.tsx',
  143. },
  144. {
  145. path: '/noAccess',
  146. component: './noAccess',
  147. },
  148. {
  149. title: '精益管管理中台',
  150. path: '/platform',
  151. component: '@/pages/platform/_layout.tsx',
  152. routes: [
  153. {
  154. path: '/platform/sqlEditer',
  155. component: '@/pages/platform/sqlediter/index.tsx',
  156. },
  157. {
  158. path: '/platform/setting',
  159. routes: [
  160. {
  161. path: '/platform/setting/userManage',
  162. component: '@/pages/platform/setting/userManage/index.tsx',
  163. },
  164. {
  165. path: '/platform/setting/hospManage',
  166. component: '@/pages/platform/setting/hospManage/index.tsx',
  167. },
  168. {
  169. path: '/platform/setting/menuManage',
  170. component: '@/pages/platform/setting/menuManage/index.tsx',
  171. wrappers: [
  172. '@/wrappers/auth',
  173. ],
  174. },
  175. {
  176. path: '/platform/setting/roleManage',
  177. component: '@/pages/platform/setting/roleManage/index.tsx',
  178. wrappers: [
  179. '@/wrappers/auth',
  180. ],
  181. },
  182. // {
  183. // path: '/platform/setting/reports',
  184. // component: '@/pages/platform/setting/reports/index.tsx',
  185. // },
  186. {
  187. path: '/platform/setting/departmentMana',
  188. component: '@/pages/platform/setting/departmentMana/index.tsx',
  189. wrappers: [
  190. '@/wrappers/auth',
  191. ],
  192. },
  193. {
  194. path: '/platform/setting/pubDicTypeMana',
  195. component: '@/pages/platform/setting/pubDicTypeMana/index.tsx',
  196. wrappers: [
  197. '@/wrappers/auth',
  198. ],
  199. },
  200. {
  201. path: '/platform/setting/hospParamsMana',
  202. component: '@/pages/platform/setting/hospParamsMana/index.tsx',
  203. wrappers: [
  204. '@/wrappers/auth',
  205. ],
  206. },
  207. {
  208. path: '/platform/setting/pubDicMana/:type',
  209. component: '@/pages/platform/setting/pubDicMana/index.tsx',
  210. wrappers: [
  211. '@/wrappers/auth',
  212. ],
  213. },
  214. {
  215. path: '/platform/setting/indicatorMana',
  216. component: '@/pages/platform/setting/indicatorMana/index.tsx',
  217. wrappers: [
  218. '@/wrappers/auth',
  219. ],
  220. },
  221. {
  222. path: '/platform/setting/paramsMana',
  223. component: '@/pages/platform/setting/paramsMana/index.tsx',
  224. wrappers: [
  225. '@/wrappers/auth',
  226. ],
  227. },
  228. {
  229. path: '/platform/setting/systemNavMana',
  230. component: '@/pages/platform/setting/systemNavMana/index.tsx',
  231. wrappers: [
  232. '@/wrappers/auth',
  233. ],
  234. },
  235. {
  236. path: '/platform/setting/notificationTemplate',
  237. component: '@/pages/platform/setting/notificationTemplate/index.tsx',
  238. wrappers: [
  239. '@/wrappers/auth',
  240. ],
  241. },
  242. {
  243. path: '/platform/setting/kcClassification',
  244. component: '@/pages/platform/setting/kcClassification/index.tsx',
  245. wrappers: [
  246. '@/wrappers/auth',
  247. ],
  248. },
  249. ],
  250. },
  251. ],
  252. },
  253. {
  254. path: '/personalCenter',
  255. component: '@/pages/personalCenter/index.tsx',
  256. // wrappers: [
  257. // '@/wrappers/auth',
  258. // ],
  259. },
  260. { path: '/login', layout: false, component: '@/pages/login/index' },
  261. ],
  262. },
  263. ],
  264. // hash:true,
  265. proxy: proxy[REACT_APP_ENV || 'dev'],
  266. manifest: {
  267. basePath: '/',
  268. },
  269. fastRefresh: {},
  270. layout: {
  271. layout: 'top',
  272. },
  273. // mfsu: {},
  274. qiankun: {
  275. master: {
  276. sandbox: {
  277. // strictStyleIsolation:true,
  278. // experimentalStyleIsolation: true, // 试验性
  279. // experimentalSandbox: 'proxy'
  280. },
  281. },
  282. },
  283. });