config.ts 8.5 KB

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