| | |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.qlyInspect"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | empty={<EmptyData |
| | | children={ |
| | | <Box sx={{ gap: 2, display: 'flex' }}> |
| | | <AsnCreatButton isInit={true} /> |
| | | </Box> |
| | | } |
| | | onClick={() => { }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | |
| | | ) |
| | | } |
| | | |
| | | const AsnCreatButton = () => { |
| | | const AsnCreatButton = ({ isInit }) => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={() => setCreateDialog(true)} label={"toolbar.asnCreate"}> |
| | | <AddIcon /> |
| | | </Button> |
| | | { |
| | | isInit ? <Button onClick={() => setCreateDialog(true)} label={"toolbar.asnCreate"} variant="contained" |
| | | color="primary"> |
| | | <AddIcon /> |
| | | </Button> : <Button onClick={() => setCreateDialog(true)} label={"toolbar.asnCreate"} > |
| | | <AddIcon /> |
| | | </Button> |
| | | } |
| | | |
| | | |
| | | <AsnSelModal |
| | | open={createDialog} |