Browse Source

添加历史清单页面并集成到框架页面

dengdx 2 months ago
parent
commit
107d9e4345
2 changed files with 55 additions and 1 deletions
  1. 3 1
      src/layouts/BasicLayout.tsx
  2. 52 0
      src/pages/patient/HistoryList.tsx

+ 3 - 1
src/layouts/BasicLayout.tsx

@@ -12,6 +12,7 @@ import AboutPage from '@/pages/demo/AboutPage';
 import HomePage from '@/pages/demo/HomePage';
 import RegisterPage from '@/pages/patient/register';
 import WorklistPage from '@/pages/patient/worklist';
+import HistorylistPage from '@/pages/patient/HistoryList';
 
 // import { Link } from 'react-router-dom';
 // import { MenuOutlined } from '@ant-design/icons';
@@ -45,7 +46,8 @@ const BasicLayout: React.FC<BasicLayoutProps> = ({ children }) => {
         'sub2': <AboutPage />,
         'process': <HomePage />,
         'register':<RegisterPage />,
-        'worklist':<WorklistPage />
+        'worklist':<WorklistPage />,
+        'historylist':<HistorylistPage />
     };
     //感知菜单项点击
     const handleMenuClick=(key:string)=>{

+ 52 - 0
src/pages/patient/HistoryList.tsx

@@ -0,0 +1,52 @@
+import React, { useState } from 'react';
+import { Row, Col, Button, Drawer, Grid, Pagination } from 'antd';
+import { SettingOutlined } from '@ant-design/icons';
+import WorklistTable from './components/WorklistTable';
+import OperationPanel from './components/OperationPanel';
+
+const { useBreakpoint } = Grid;
+
+const HistorylistPage: React.FC = () => {
+  const screens = useBreakpoint();
+  const [drawerVisible, setDrawerVisible] = useState(false);
+
+  return (
+    <div className="p-4">
+      {screens.xs ? (
+        <>
+          <WorklistTable />
+          <Button
+            type="primary"
+            shape="circle"
+            icon={<SettingOutlined />}
+            className="fixed bottom-6 right-6 z-50"
+            onClick={() => setDrawerVisible(true)}
+          />
+          <Drawer
+            title="操作面板"
+            placement="left"
+            onClose={() => setDrawerVisible(false)}
+            open={drawerVisible}
+            width={300}
+          >
+            <OperationPanel />
+          </Drawer>
+        </>
+      ) : (
+        <Row gutter={16}>
+          <Col span={screens.lg ? 18 : screens.md ? 20 : 24}>
+            <WorklistTable />
+            <div className="flex justify-center mt-4">
+                <Pagination defaultCurrent={1} total={50} />
+            </div>
+          </Col>
+          <Col span={screens.lg ? 6 : screens.md ? 4 : 0}>
+            <OperationPanel />
+          </Col>
+        </Row>
+      )}
+    </div>
+  );
+};
+
+export default HistorylistPage;