PatientManagement.tsx 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import React, { Suspense, lazy } from 'react';
  2. import { Tabs } from 'antd';
  3. import { FormattedMessage } from 'react-intl';
  4. // 懒加载各子页面
  5. const WorklistPage = lazy(() => import('./worklist'));
  6. const OutputListPage = lazy(() => import('./OutputList'));
  7. const HistoryListPage = lazy(() => import('./HistoryList'));
  8. const ArchiveListPage = lazy(() => import('./ArchiveList'));
  9. const BinPage = lazy(() => import('./Bin'));
  10. const RegisterPage = lazy(() => import('./register'));
  11. const { TabPane } = Tabs;
  12. const PatientManagement: React.FC = () => {
  13. return (
  14. <div className="h-full flex flex-col">
  15. <Tabs
  16. defaultActiveKey="worklist"
  17. type="line"
  18. className="flex-1 h-full"
  19. tabBarGutter={32}
  20. destroyInactiveTabPane
  21. >
  22. <TabPane
  23. tab={
  24. <FormattedMessage
  25. id="patient.tab.worklist"
  26. defaultMessage="Worklist"
  27. />
  28. }
  29. key="worklist"
  30. >
  31. <Suspense fallback={null}>
  32. <WorklistPage />
  33. </Suspense>
  34. </TabPane>
  35. <TabPane
  36. tab={
  37. <FormattedMessage id="patient.tab.output" defaultMessage="Output" />
  38. }
  39. key="output"
  40. >
  41. <Suspense fallback={null}>
  42. <OutputListPage />
  43. </Suspense>
  44. </TabPane>
  45. <TabPane
  46. tab={
  47. <FormattedMessage
  48. id="patient.tab.history"
  49. defaultMessage="History"
  50. />
  51. }
  52. key="history"
  53. >
  54. <Suspense fallback={null}>
  55. <HistoryListPage />
  56. </Suspense>
  57. </TabPane>
  58. <TabPane
  59. tab={
  60. <FormattedMessage
  61. id="patient.tab.archive"
  62. defaultMessage="Archive"
  63. />
  64. }
  65. key="archive"
  66. >
  67. <Suspense fallback={null}>
  68. <ArchiveListPage />
  69. </Suspense>
  70. </TabPane>
  71. <TabPane
  72. tab={<FormattedMessage id="patient.tab.bin" defaultMessage="Bin" />}
  73. key="bin"
  74. >
  75. <Suspense fallback={null}>
  76. <BinPage />
  77. </Suspense>
  78. </TabPane>
  79. <TabPane
  80. tab={
  81. <FormattedMessage
  82. id="patient.tab.register"
  83. defaultMessage="Register"
  84. />
  85. }
  86. key="register"
  87. >
  88. <Suspense fallback={null}>
  89. <RegisterPage />
  90. </Suspense>
  91. </TabPane>
  92. </Tabs>
  93. </div>
  94. );
  95. };
  96. export default PatientManagement;