From 9f90ab48ee848a56f45c80e5d050676d4f3a6c2f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 24 九月 2024 09:55:29 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/loc/LocList.jsx | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/zy-acs-flow/src/page/loc/LocList.jsx b/zy-acs-flow/src/page/loc/LocList.jsx
index 20bf815..7e55196 100644
--- a/zy-acs-flow/src/page/loc/LocList.jsx
+++ b/zy-acs-flow/src/page/loc/LocList.jsx
@@ -30,6 +30,7 @@
ReferenceArrayInput,
AutocompleteInput,
DeleteButton,
+ Button,
} from 'react-admin';
import { Box, Typography, Card, Stack } from '@mui/material';
import { styled } from '@mui/material/styles';
@@ -40,10 +41,11 @@
import MyExportButton from '../components/MyExportButton';
import PageDrawer from "../components/PageDrawer";
import MyField from "../components/MyField";
-import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting';
+import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import * as Common from '@/utils/common';
-import InitButton from "./InitButton";
-import RepartitionIcon from '@mui/icons-material/Repartition';
+import CorporateFareIcon from '@mui/icons-material/CorporateFare';
+import LocInit from "./LocInit";
+import rowSx from "./rowSx";
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
'& .css-1vooibu-MuiSvgIcon-root': {
@@ -103,6 +105,7 @@
const [createDialog, setCreateDialog] = useState(false);
const [drawerVal, setDrawerVal] = useState(false);
+ const [initDialog, setInitDialog] = useState(false);
return (
<Box display="flex">
@@ -122,13 +125,15 @@
actions={(
<TopToolbar>
<FilterButton />
- <InitButton label='page.loc.init' icon={<RepartitionIcon />} />
+ <Button label='page.loc.init' onClick={(event) => {
+ setInitDialog(true);
+ }}><CorporateFareIcon /></Button>
<MyCreateButton onClick={() => { setCreateDialog(true) }} />
<SelectColumnsButton preferenceKey='loc' />
<MyExportButton />
</TopToolbar>
)}
- perPage={25}
+ perPage={DEFAULT_PAGE_SIZE}
>
<StyledDatagrid
preferenceKey='loc'
@@ -137,6 +142,7 @@
expand={() => <LocPanel />}
expandSingle={true}
omit={['id', 'locType', 'uuid', 'statusBool', 'updateBy', 'createTime', 'createBy', 'memo']}
+ rowSx={rowSx(drawerVal || null)}
>
<NumberField source="id" />
<TextField source="locNo" label="table.field.loc.locNo" />
@@ -189,6 +195,10 @@
setDrawerVal={setDrawerVal}
>
</PageDrawer>
+ <LocInit
+ open={initDialog}
+ setOpen={setInitDialog}
+ />
</Box>
)
}
--
Gitblit v1.9.1