config.ts 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:04:20
  4. * @LastEditTime: 2024-08-21 17:43:03
  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. },
  78. {
  79. path: '/pfmBackMana',
  80. microApp: 'pfmBackMana',
  81. microAppProps: {
  82. autoSetLoading: true,
  83. autoCaptureError: true,
  84. },
  85. },
  86. {
  87. path: '/CostAccountingSys',
  88. microApp: 'CostAccountingSys',
  89. microAppProps: {
  90. autoCaptureError: true,
  91. //loader: (loading:boolean) => <div>loading</div>,
  92. },
  93. },
  94. {
  95. path: '/devServer',
  96. microApp: 'devServer',
  97. microAppProps: {
  98. autoCaptureError: true,
  99. //loader: (loading:boolean) => <div>loading</div>,
  100. },
  101. },
  102. {
  103. path: '/personnelManaSystem',
  104. microApp: 'personnelManaSystem',
  105. microAppProps: {
  106. autoCaptureError: true,
  107. //loader: (loading:boolean) => <div>loading</div>,
  108. },
  109. },
  110. {
  111. path: '/nursingWorkersManaSystem',
  112. microApp: 'nursingWorkersManaSystem',
  113. microAppProps: {
  114. autoCaptureError: true,
  115. //loader: (loading:boolean) => <div>loading</div>,
  116. },
  117. },
  118. {
  119. path: '/channelIndex/channelIndexOne',
  120. component: '@/pages/channelIndex/channelIndexOne/index.tsx',
  121. },
  122. {
  123. path: '/index',
  124. title: '欢迎进入医管平台',
  125. component: '@/pages/index/index.tsx',
  126. },
  127. {
  128. path: '/noAccess',
  129. component: './noAccess',
  130. },
  131. {
  132. title: '精益管管理中台',
  133. path: '/platform',
  134. component: '@/pages/platform/_layout.tsx',
  135. routes: [
  136. {
  137. path: '/platform/sqlEditer',
  138. component: '@/pages/platform/sqlediter/index.tsx',
  139. },
  140. {
  141. path: '/platform/setting',
  142. routes: [
  143. {
  144. path: '/platform/setting/userManage',
  145. component: '@/pages/platform/setting/userManage/index.tsx',
  146. },
  147. {
  148. path: '/platform/setting/hospManage',
  149. component: '@/pages/platform/setting/hospManage/index.tsx',
  150. },
  151. {
  152. path: '/platform/setting/menuManage',
  153. component: '@/pages/platform/setting/menuManage/index.tsx',
  154. wrappers: [
  155. '@/wrappers/auth',
  156. ],
  157. },
  158. {
  159. path: '/platform/setting/roleManage',
  160. component: '@/pages/platform/setting/roleManage/index.tsx',
  161. wrappers: [
  162. '@/wrappers/auth',
  163. ],
  164. },
  165. // {
  166. // path: '/platform/setting/reports',
  167. // component: '@/pages/platform/setting/reports/index.tsx',
  168. // },
  169. {
  170. path: '/platform/setting/departmentMana',
  171. component: '@/pages/platform/setting/departmentMana/index.tsx',
  172. wrappers: [
  173. '@/wrappers/auth',
  174. ],
  175. },
  176. {
  177. path: '/platform/setting/pubDicTypeMana',
  178. component: '@/pages/platform/setting/pubDicTypeMana/index.tsx',
  179. wrappers: [
  180. '@/wrappers/auth',
  181. ],
  182. },
  183. {
  184. path: '/platform/setting/hospParamsMana',
  185. component: '@/pages/platform/setting/hospParamsMana/index.tsx',
  186. wrappers: [
  187. '@/wrappers/auth',
  188. ],
  189. },
  190. {
  191. path: '/platform/setting/pubDicMana/:type',
  192. component: '@/pages/platform/setting/pubDicMana/index.tsx',
  193. wrappers: [
  194. '@/wrappers/auth',
  195. ],
  196. },
  197. {
  198. path: '/platform/setting/indicatorMana',
  199. component: '@/pages/platform/setting/indicatorMana/index.tsx',
  200. wrappers: [
  201. '@/wrappers/auth',
  202. ],
  203. },
  204. {
  205. path: '/platform/setting/paramsMana',
  206. component: '@/pages/platform/setting/paramsMana/index.tsx',
  207. wrappers: [
  208. '@/wrappers/auth',
  209. ],
  210. },
  211. {
  212. path: '/platform/setting/systemNavMana',
  213. component: '@/pages/platform/setting/systemNavMana/index.tsx',
  214. wrappers: [
  215. '@/wrappers/auth',
  216. ],
  217. },
  218. {
  219. path: '/platform/setting/notificationTemplate',
  220. component: '@/pages/platform/setting/notificationTemplate/index.tsx',
  221. wrappers: [
  222. '@/wrappers/auth',
  223. ],
  224. },
  225. {
  226. path: '/platform/setting/kcClassification',
  227. component: '@/pages/platform/setting/kcClassification/index.tsx',
  228. wrappers: [
  229. '@/wrappers/auth',
  230. ],
  231. },
  232. ],
  233. },
  234. ],
  235. },
  236. {
  237. path: '/personalCenter',
  238. component: '@/pages/personalCenter/index.tsx',
  239. // wrappers: [
  240. // '@/wrappers/auth',
  241. // ],
  242. },
  243. { path: '/login', layout: false, component: '@/pages/login/index' },
  244. ],
  245. },
  246. ],
  247. // hash:true,
  248. proxy: proxy[REACT_APP_ENV || 'dev'],
  249. manifest: {
  250. basePath: '/',
  251. },
  252. fastRefresh: {},
  253. layout: {
  254. layout: 'top',
  255. },
  256. // mfsu: {},
  257. qiankun: {
  258. master: {
  259. sandbox: {
  260. // strictStyleIsolation:true,
  261. // // experimentalStyleIsolation: true, // 试验性
  262. },
  263. },
  264. },
  265. });