ArchiveList.tsx 1.8 KB

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