|  |  | 
 |  |  |     ReferenceArrayInput, | 
 |  |  |     AutocompleteInput, | 
 |  |  |     DeleteButton, | 
 |  |  |     Button, | 
 |  |  | } from 'react-admin'; | 
 |  |  | import { Box, Typography, Card, Stack } from '@mui/material'; | 
 |  |  | import { styled } from '@mui/material/styles'; | 
 |  |  | 
 |  |  | import MyField from "../components/MyField"; | 
 |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; | 
 |  |  | import * as Common from '@/utils/common'; | 
 |  |  | import AllInclusiveIcon from '@mui/icons-material/AllInclusive'; | 
 |  |  |  | 
 |  |  | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ | 
 |  |  |     '& .css-1vooibu-MuiSvgIcon-root': { | 
 |  |  | 
 |  |  |                 sort={{ field: "create_time", order: "desc" }} | 
 |  |  |                 actions={( | 
 |  |  |                     <TopToolbar> | 
 |  |  |                         <InitButton /> | 
 |  |  |                         <FilterButton /> | 
 |  |  |                         <MyCreateButton onClick={() => { setCreateDialog(true) }} /> | 
 |  |  |                         <SelectColumnsButton preferenceKey='container' /> | 
 |  |  | 
 |  |  |                     preferenceKey='container' | 
 |  |  |                     bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} | 
 |  |  |                     rowClick={(id, resource, record) => false} | 
 |  |  |                     expand={() => <ContainerPanel />} | 
 |  |  |                     expandSingle={true} | 
 |  |  |                     omit={['id', 'createTime', 'createBy', 'memo']} | 
 |  |  |                     omit={['id', 'createTime', 'createBy', 'memo','statusBool','updateBy']} | 
 |  |  |                 > | 
 |  |  |                     <NumberField source="id" /> | 
 |  |  |                     {/* <TextField source="code" label="table.field.container.code" /> */} | 
 |  |  | 
 |  |  |     ) | 
 |  |  | } | 
 |  |  |  | 
 |  |  | //初始化按钮 | 
 |  |  | const InitButton = ({ setOpen }) => { | 
 |  |  |     const close = () => { | 
 |  |  |         setOpen(false) | 
 |  |  |     } | 
 |  |  |     return ( | 
 |  |  |         <Button | 
 |  |  |             label="toolbar.init" | 
 |  |  |             variant="outlined" | 
 |  |  |             size="medium" | 
 |  |  |             onClick={close} | 
 |  |  |             startIcon={<AllInclusiveIcon />} | 
 |  |  |             sx={{ margin: '3.5em' }} /> | 
 |  |  |     ) | 
 |  |  | } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | export default ContainerList; |