From 3472edd85b25bcff5f519fc3d358988cc10e0799 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 24 九月 2024 15:41:18 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/task/TaskList.jsx |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/zy-acs-flow/src/page/task/TaskList.jsx b/zy-acs-flow/src/page/task/TaskList.jsx
index 870234b..01b1206 100644
--- a/zy-acs-flow/src/page/task/TaskList.jsx
+++ b/zy-acs-flow/src/page/task/TaskList.jsx
@@ -32,6 +32,8 @@
     DeleteButton,
     FunctionField,
     Pagination,
+    useNotify,
+    useRefresh,
 } from 'react-admin';
 import { Box, Chip, Card, Stack } from '@mui/material';
 import { styled } from '@mui/material/styles';
@@ -130,7 +132,8 @@
 
 const TaskList = () => {
     const translate = useTranslate();
-
+    const notify = useNotify();
+    const refresh = useRefresh();
     const [createDialog, setCreateDialog] = useState(false);
     const [drawerVal, setDrawerVal] = useState(false);
 
@@ -139,6 +142,7 @@
             const { code, msg, data } = res.data;
             if (code === 200) {
                 notify(msg || 'common.response.success', { type: 'success', messageArgs: { _: msg } });
+                refresh();
             } else {
                 notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } });
             }
@@ -150,6 +154,7 @@
             const { code, msg, data } = res.data;
             if (code === 200) {
                 notify(msg || 'common.response.success', { type: 'success', messageArgs: { _: msg } });
+                refresh();
             } else {
                 notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } });
             }
@@ -179,8 +184,8 @@
                         <MyExportButton />
                     </TopToolbar>
                 )}
-                pagination={<Pagination rowsPerPageOptions={[10, 20, 50, 100]} />}
-                perPage={20}
+                pagination={<Pagination rowsPerPageOptions={[10, 25, 50, 100]} />}
+                perPage={25}
                 aside={<TaskListAside />}
             >
                 <StyledDatagrid

--
Gitblit v1.9.1