.umirc.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. /*
  2. * @Author: code4eat awesomedema@gmail.com
  3. * @Date: 2022-12-14 14:14:32
  4. * @LastEditors: code4eat awesomedema@gmail.com
  5. * @LastEditTime: 2024-12-05 17:33:15
  6. * @FilePath: /BudgetManaSystem/.umirc.ts
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. import { defineConfig } from '@umijs/max';
  10. import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
  11. const { REACT_APP_ENV } = process.env;
  12. const path = require('path');
  13. // 从 package.json 读取版本号,如果没有则使用默认值
  14. const pkg = require('./package.json');
  15. const APP_VERSION = pkg.version || '1.0.0';
  16. const BUILD_TIME = new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' });
  17. export default defineConfig({
  18. // 注入版本信息到全局变量
  19. define: {
  20. 'process.env.APP_VERSION': APP_VERSION,
  21. 'process.env.BUILD_TIME': BUILD_TIME,
  22. },
  23. hash: true,
  24. antd: {
  25. configProvider: {
  26. prefixCls: 'cost-ant',
  27. },
  28. },
  29. // alias:{
  30. // 'ace-builds': path.resolve(__dirname, './node_modules/ace-builds/src-noconflict'),
  31. // },
  32. qiankun: {
  33. slave: {},
  34. },
  35. mfsu: false,
  36. lessLoader: {
  37. modifyVars: {
  38. '@ant-prefix': 'cost-ant',
  39. '@primary-color': '#3377FF',
  40. '@border-color-base': '#dae2f2'
  41. },
  42. javascriptEnabled: true,
  43. }, //对应修改生成的 antd 样式类名
  44. chainWebpack(config, { webpack }) {
  45. config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
  46. {
  47. // 指定需要加载的语言和特性
  48. languages: ['sql', 'javascript', 'typescript']
  49. }
  50. ]);
  51. },
  52. access: {},
  53. model: {},
  54. initialState: {},
  55. request: {},
  56. layout: {
  57. title: '成本核算系统',
  58. layout: 'side',
  59. menuProps: {
  60. theme: 'light',
  61. }
  62. },
  63. manifest: {
  64. basePath: '/',
  65. },
  66. publicPath: REACT_APP_ENV == 'dev' ? '/' : '/costAccount/',
  67. proxy: {
  68. '/gateway': {
  69. target: 'http://120.27.235.181:5000/gateway',//开发
  70. //target:'http://47.96.149.190:5000/gateway', //演示
  71. changeOrigin: true,
  72. // pathRewrite: { '^/gateway': '' },
  73. }
  74. },
  75. routes: [
  76. {
  77. path: '/',
  78. redirect: '/home',
  79. },
  80. { path: '*', component: '@/pages/404' },
  81. {
  82. path: '/noAccess',
  83. component: './noAccess',
  84. },
  85. {
  86. path: '/home',
  87. component: './Home/index',
  88. },
  89. {
  90. path: '/baseSetting',
  91. name: '基础设置',
  92. routes: [
  93. {
  94. path: '/baseSetting/responsibilityCenterSet',
  95. name: '责任中心设置',
  96. routes: [
  97. {
  98. path: '/baseSetting/responsibilityCenterSet/responsibilityCenter',
  99. name: '责任中心管理',
  100. component: './baseSetting/responsibilityCenterSet/responsibilityCenter/index',
  101. },
  102. {
  103. path: '/baseSetting/responsibilityCenterSet/responsibilityCenterConnect',
  104. name: '责任中心对应',
  105. component: './baseSetting/responsibilityCenterSet/responsibilityCenterConnect/index',
  106. },
  107. ],
  108. },
  109. {
  110. path: '/baseSetting/accountingAccountSet',
  111. name: '会计科目设置',
  112. routes: [
  113. {
  114. path: '/baseSetting/accountingAccountSet/costIncomeProjectMana',
  115. name: '会计收入项目管理',
  116. component: './baseSetting/accountingAccountSet/costIncomeProjectMana/index',
  117. },
  118. {
  119. path: '/baseSetting/accountingAccountSet/accountingSubMana',
  120. name: '会计科目管理',
  121. component: './baseSetting/accountingAccountSet/accountingSubMana/index',
  122. },
  123. {
  124. path: '/baseSetting/accountingAccountSet/accountingSubMap',
  125. name: '会计科目对应',
  126. component: './baseSetting/accountingAccountSet/accountingSubMap/index',
  127. },
  128. {
  129. path: '/baseSetting/accountingAccountSet/chargeItemMap',
  130. name: '收费项目对应',
  131. component: './baseSetting/accountingAccountSet/chargeItemMap/index',
  132. },
  133. ],
  134. },
  135. {
  136. path: '/baseSetting/costAllocationSet',
  137. name: '成本分摊设置',
  138. routes: [
  139. {
  140. path: '/baseSetting/costAllocationSet/allocationLevelSet',
  141. name: '分摊层级设置',
  142. component: './baseSetting/costAllocationSet/allocationLevelSet/index',
  143. },
  144. {
  145. path: '/baseSetting/costAllocationSet/idleCostSetting',
  146. name: '闲置成本设置',
  147. component: './baseSetting/costAllocationSet/idleCostSetting/index',
  148. },
  149. {
  150. path: '/baseSetting/costAllocationSet/costAllocationParamsSet',
  151. name: '成本分摊参数设置',
  152. component: './baseSetting/costAllocationSet/costAllocationParamsSet/index',
  153. },
  154. {
  155. path: '/baseSetting/costAllocationSet/costAllocationParamsDeal',
  156. name: '成本分摊参数处理',
  157. component: './baseSetting/costAllocationSet/costAllocationParamsDeal/index',
  158. },
  159. {
  160. path: '/baseSetting/costAllocationSet/allocationParamsMap',
  161. name: '分摊参数对应',
  162. component: './baseSetting/costAllocationSet/allocationParamsMap/index',
  163. },
  164. {
  165. path: '/baseSetting/costAllocationSet/revenueImputationSet',
  166. name: '收入归集设置',
  167. component: './baseSetting/costAllocationSet/revenueImputationSet/index',
  168. },
  169. ],
  170. },
  171. {
  172. path: '/baseSetting/otherItemSet',
  173. name: '其它设置',
  174. icon: 'tool',
  175. routes: [
  176. {
  177. path: '/baseSetting/otherItemSet/diySqlMana',
  178. name: '自定义SQl管理',
  179. component: './baseSetting/otherItemSet/diySqlMana/index',
  180. },
  181. {
  182. path: '/baseSetting/otherItemSet/reportItemSet',
  183. name: '报表项目设置',
  184. component: './baseSetting/otherItemSet/reportItemSet/index',
  185. },
  186. {
  187. path: '/baseSetting/otherItemSet/departmentCostCalc',
  188. name: '科室损益计算',
  189. component: './baseSetting/otherItemSet/departmentCostCalc/index',
  190. },
  191. {
  192. path: '/baseSetting/otherItemSet/visitsAndBedDayCostSetting',
  193. name: '诊次/床日成本设置',
  194. component: './baseSetting/otherItemSet/visitsAndBedDayCostSetting/index',
  195. },
  196. {
  197. path: '/baseSetting/otherItemSet/wholeHospCostAndIncomeSet',
  198. name: '全院其他收支设置',
  199. component: './baseSetting/otherItemSet/wholeHospCostAndIncomeSet/index',
  200. },
  201. ],
  202. },
  203. ],
  204. },
  205. {
  206. path: '/monthlyInfoCollection',
  207. name: '月度信息采集2',
  208. component: './monthlyInfoCollection/index',
  209. },
  210. {
  211. path: '/departmentCostCheck',
  212. name: '科室损益查询',
  213. routes: [
  214. {
  215. path: '/departmentCostCheck/month',
  216. name: '月度损益查询',
  217. component: './departmentCostCheck/index',
  218. },
  219. {
  220. path: '/departmentCostCheck/year',
  221. name: '年度损益查询',
  222. component: './departmentCostCheck/index',
  223. },
  224. ],
  225. },
  226. {
  227. path: '/hospitalProfitAndLoss',
  228. name: '全院损益查询',
  229. routes: [
  230. {
  231. path: '/hospitalProfitAndLoss/month',
  232. name: '月度损益查询',
  233. component: './hospitalProfitAndLoss/index',
  234. },
  235. {
  236. path: '/hospitalProfitAndLoss/year',
  237. name: '年度损益查询',
  238. component: './hospitalProfitAndLoss/index',
  239. },
  240. ],
  241. },
  242. {
  243. path: '/departmentMzCostCalc',
  244. name: '科室门住损益计算',
  245. component: './departmentMenzhuCostCalc/index',
  246. },
  247. {
  248. path: '/specialDataImport',
  249. name: '填报数据导入',
  250. component: './specialDataImport/index',
  251. },
  252. {
  253. path: '/incomeCollectionAction',
  254. name: '收入归集',
  255. component: './incomeCollectionAction/index',
  256. },
  257. {
  258. path: '/monthlyInfoSearch',
  259. name: '月度信息采集',
  260. routes: [
  261. {
  262. path: '/monthlyInfoSearch/wholeHospIncomeAndCost',
  263. name: '全院其他收支',
  264. component: './monthlyInfoSearch/wholeHospIncomeAndCost/index',
  265. },
  266. {
  267. path: '/monthlyInfoSearch/empCostDataImport',
  268. name: '人事成本数据导入',
  269. component: './monthlyInfoSearch/empCostDataImport/index',
  270. },
  271. {
  272. path: '/monthlyInfoSearch/patientChargeItemsImport',
  273. name: '患者收费项目导入',
  274. component: './monthlyInfoSearch/patientChargeItemsImport/index',
  275. },
  276. {
  277. path: '/monthlyInfoSearch/patientInfoImport',
  278. name: '患者信息导入',
  279. component: './monthlyInfoSearch/patientInfoImport/index',
  280. },
  281. {
  282. path: '/monthlyInfoSearch/incomeCostDataImport',
  283. name: '收入成本数据导入',
  284. component: './monthlyInfoSearch/incomeCostDataImport/index',
  285. },
  286. ],
  287. },
  288. {
  289. path: '/costAccounting',
  290. name: '成本核算',
  291. routes: [
  292. {
  293. path: '/costAccounting/:calcPageKey',
  294. component: './costAccounting/calcPageTemplate/index',
  295. }
  296. ],
  297. },
  298. {
  299. path: '/reportExport',
  300. name: '报表输出',
  301. routes: [
  302. {
  303. path: '/reportExport/:reportType',
  304. routes: [
  305. {
  306. path: '/reportExport/:reportType/:reportCode',
  307. component: './reportExport/report',
  308. },
  309. ]
  310. }
  311. ],
  312. },
  313. {
  314. path: '/operationalAnalysis',
  315. name: '运营分析',
  316. routes: [
  317. {}
  318. ],
  319. },
  320. {
  321. path: '/costLibraryManagement',
  322. name: '成本库管理',
  323. routes: [
  324. {
  325. path: '/costLibraryManagement/basicCostManagement',
  326. name: '基础成本管理',
  327. routes: [
  328. {
  329. path: '/costLibraryManagement/basicCostManagement/personnelClassificationMana',
  330. name: '人事分类管理',
  331. component: './costLibraryManagement/basicCostManagement/personnelClassificationMana/index',
  332. },
  333. {
  334. path: '/costLibraryManagement/basicCostManagement/drugCostManagement',
  335. name: '药品成本管理',
  336. component: './costLibraryManagement/basicCostManagement/drugCostManagement/index',
  337. },
  338. {
  339. path: '/costLibraryManagement/basicCostManagement/materialCostManagement',
  340. name: '材料成本管理',
  341. component: './costLibraryManagement/basicCostManagement/materialCostManagement/index',
  342. },
  343. {
  344. path: '/costLibraryManagement/basicCostManagement/equipmentCostManagement',
  345. name: '设备成本管理',
  346. component: './costLibraryManagement/basicCostManagement/equipmentCostManagement/index',
  347. },
  348. {
  349. path: '/costLibraryManagement/basicCostManagement/spaceCostManagement',
  350. name: '空间成本管理',
  351. component: './costLibraryManagement/basicCostManagement/spaceCostManagement/index',
  352. },
  353. ],
  354. },
  355. {
  356. path: '/costLibraryManagement/projectCostManagement',
  357. name: '项目成本管理',
  358. routes: [
  359. {
  360. path: '/costLibraryManagement/projectCostManagement/chargeItemsMana',
  361. name: '收费项目管理',
  362. component: './costLibraryManagement/projectCostManagement/chargeItemsMana/index',
  363. },
  364. {
  365. path: '/costLibraryManagement/projectCostManagement/standardProjectMana',
  366. name: '标准项目管理',
  367. component: './costLibraryManagement/projectCostManagement/standardProjectMana/index',
  368. },
  369. {
  370. path: '/costLibraryManagement/projectCostManagement/projectShareParamsSet',
  371. name: '项目分摊参数设置',
  372. component: './costLibraryManagement/projectCostManagement/projectShareParamsSet/index',
  373. },
  374. {
  375. path: '/costLibraryManagement/projectCostManagement/projectCostShareSet',
  376. name: '项目成本分摊设置',
  377. component: './costLibraryManagement/projectCostManagement/projectCostShareSet/index',
  378. },
  379. ],
  380. },
  381. {
  382. path: '/costLibraryManagement/medicalOrderProject',
  383. name: '医嘱项目',
  384. routes: [
  385. {
  386. path: '/costLibraryManagement/medicalOrderProject/medicalOrderProjectMana',
  387. name: '收费项目管理',
  388. component: './costLibraryManagement/medicalOrderProject/medicalOrderProjectMana/index',
  389. },
  390. ],
  391. },
  392. {
  393. path: '/costLibraryManagement/diseaseCostManagement',
  394. name: '病种成本管理',
  395. routes: [
  396. {
  397. path: '/costLibraryManagement/diseaseCostManagement/diseaseMana',
  398. name: '病种管理',
  399. component: './costLibraryManagement/diseaseCostManagement/diseaseMana/index',
  400. },
  401. {
  402. path: '/costLibraryManagement/diseaseCostManagement/diseaseDiagnosisComparison',
  403. name: '病种诊断对照',
  404. component: './costLibraryManagement/diseaseCostManagement/diseaseDiagnosisComparison/index',
  405. },
  406. ],
  407. },
  408. {
  409. path: '/costLibraryManagement/clinicalPathwayCostManagement',
  410. name: '临床路径成本管理',
  411. routes: [
  412. {}
  413. ],
  414. },
  415. {
  416. path: '/costLibraryManagement/reportMana',
  417. name: '报表管理',
  418. routes: [
  419. {
  420. path: '/costLibraryManagement/reportMana/reportColumnMana',
  421. name: '报表列管理',
  422. component: './costLibraryManagement/reportMana/reportColumnMana/index',
  423. },
  424. {
  425. path: '/costLibraryManagement/reportMana/reportListMana',
  426. name: '报表管理',
  427. component: './costLibraryManagement/reportMana/reportListMana/index',
  428. },
  429. {
  430. path: '/costLibraryManagement/reportMana/reportNavSet',
  431. name: '报表跳转',
  432. component: './costLibraryManagement/reportMana/reportNavSet/index',
  433. },
  434. ],
  435. },
  436. ],
  437. },
  438. ],
  439. npmClient: 'yarn',
  440. });