.umirc.ts 15 KB

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