config.ts 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:04:20
  4. * @LastEditTime: 2024-12-10 16:44:01
  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. path: '/platform',
  150. component: '@/pages/platform/_layout.tsx',
  151. routes: [
  152. {
  153. path: '/platform/sqlEditer',
  154. component: '@/pages/platform/sqlediter/index.tsx',
  155. },
  156. {
  157. path: '/platform/setting',
  158. routes: [
  159. {
  160. path: '/platform/setting/userManage',
  161. component: '@/pages/platform/setting/userManage/index.tsx',
  162. },
  163. {
  164. path: '/platform/setting/hospManage',
  165. component: '@/pages/platform/setting/hospManage/index.tsx',
  166. },
  167. {
  168. path: '/platform/setting/menuManage',
  169. component: '@/pages/platform/setting/menuManage/index.tsx',
  170. wrappers: [
  171. '@/wrappers/auth',
  172. ],
  173. },
  174. {
  175. path: '/platform/setting/roleManage',
  176. component: '@/pages/platform/setting/roleManage/index.tsx',
  177. wrappers: [
  178. '@/wrappers/auth',
  179. ],
  180. },
  181. // {
  182. // path: '/platform/setting/reports',
  183. // component: '@/pages/platform/setting/reports/index.tsx',
  184. // },
  185. {
  186. path: '/platform/setting/departmentMana',
  187. component: '@/pages/platform/setting/departmentMana/index.tsx',
  188. wrappers: [
  189. '@/wrappers/auth',
  190. ],
  191. },
  192. {
  193. path: '/platform/setting/pubDicTypeMana',
  194. component: '@/pages/platform/setting/pubDicTypeMana/index.tsx',
  195. wrappers: [
  196. '@/wrappers/auth',
  197. ],
  198. },
  199. {
  200. path: '/platform/setting/hospParamsMana',
  201. component: '@/pages/platform/setting/hospParamsMana/index.tsx',
  202. wrappers: [
  203. '@/wrappers/auth',
  204. ],
  205. },
  206. {
  207. path: '/platform/setting/pubDicMana/:type',
  208. component: '@/pages/platform/setting/pubDicMana/index.tsx',
  209. wrappers: [
  210. '@/wrappers/auth',
  211. ],
  212. },
  213. {
  214. path: '/platform/setting/indicatorMana',
  215. component: '@/pages/platform/setting/indicatorMana/index.tsx',
  216. wrappers: [
  217. '@/wrappers/auth',
  218. ],
  219. },
  220. {
  221. path: '/platform/setting/paramsMana',
  222. component: '@/pages/platform/setting/paramsMana/index.tsx',
  223. wrappers: [
  224. '@/wrappers/auth',
  225. ],
  226. },
  227. {
  228. path: '/platform/setting/systemNavMana',
  229. component: '@/pages/platform/setting/systemNavMana/index.tsx',
  230. wrappers: [
  231. '@/wrappers/auth',
  232. ],
  233. },
  234. {
  235. path: '/platform/setting/notificationTemplate',
  236. component: '@/pages/platform/setting/notificationTemplate/index.tsx',
  237. wrappers: [
  238. '@/wrappers/auth',
  239. ],
  240. },
  241. {
  242. path: '/platform/setting/kcClassification',
  243. component: '@/pages/platform/setting/kcClassification/index.tsx',
  244. wrappers: [
  245. '@/wrappers/auth',
  246. ],
  247. },
  248. ],
  249. },
  250. ],
  251. },
  252. {
  253. path: '/personalCenter',
  254. component: '@/pages/personalCenter/index.tsx',
  255. // wrappers: [
  256. // '@/wrappers/auth',
  257. // ],
  258. },
  259. { path: '/login', layout: false, component: '@/pages/login/index' },
  260. ],
  261. },
  262. ],
  263. // hash:true,
  264. proxy: proxy[REACT_APP_ENV || 'dev'],
  265. manifest: {
  266. basePath: '/',
  267. },
  268. fastRefresh: {},
  269. layout: {
  270. layout: 'top',
  271. },
  272. // mfsu: {},
  273. qiankun: {
  274. master: {
  275. sandbox: {
  276. // strictStyleIsolation:true,
  277. // experimentalStyleIsolation: true, // 试验性
  278. // experimentalSandbox: 'proxy'
  279. },
  280. },
  281. },
  282. });