ArchiveList.tsx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import React, { useState } from 'react';
  2. import { Row, Col, Button, Drawer, Grid, Pagination } from 'antd';
  3. import { SettingOutlined } from '@ant-design/icons';
  4. import WorklistTable from './components/WorklistTable';
  5. import ArchiveOperationPanel from './components/ArchiveOperationPanel';
  6. const { useBreakpoint } = Grid;
  7. const ArchivelistPage: React.FC = () => {
  8. const screens = useBreakpoint();
  9. const [drawerVisible, setDrawerVisible] = useState(false);
  10. return (
  11. <div className="h-full">
  12. {screens.xs ? (
  13. <>
  14. <WorklistTable />
  15. <Button
  16. type="primary"
  17. shape="circle"
  18. icon={<SettingOutlined />}
  19. className="fixed bottom-6 right-6 z-50"
  20. onClick={() => setDrawerVisible(true)}
  21. />
  22. <Drawer
  23. title="操作面板"
  24. placement="left"
  25. onClose={() => setDrawerVisible(false)}
  26. open={drawerVisible}
  27. width={300}
  28. >
  29. <ArchiveOperationPanel />
  30. </Drawer>
  31. </>
  32. ) : (
  33. <Row className='h-full flex-1'>
  34. <Col span={screens.lg ? 18 : screens.md ? 20 : 24}>
  35. <WorklistTable />
  36. <div className="flex justify-center mt-4">
  37. <Pagination defaultCurrent={1} total={50} />
  38. </div>
  39. </Col>
  40. <Col span={screens.lg ? 6 : screens.md ? 4 : 0} className='h-full overflow-auto'>
  41. <ArchiveOperationPanel />
  42. </Col>
  43. </Row>
  44. )}
  45. </div>
  46. );
  47. };
  48. export default ArchivelistPage;