#
luxiaotao1123
2024-09-24 4a1418240adea7f3e1a7bf058d44197499e4a4cc
zy-acs-flow/src/page/bus/BusList.jsx
@@ -99,6 +99,10 @@
    const [createDialog, setCreateDialog] = useState(false);
    const [drawerVal, setDrawerVal] = useState(false);
    const onCancel = (onCancel) => {
        alert(onCancel.busNo);
    }
    return (
        <Box display="flex">
            <List
@@ -167,7 +171,18 @@
                    <FunctionField label="common.field.opt" cellClassName="opt" render={record => (
                        (record.busSts === 15 || true) && (
                            // <DeleteButton label="" sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
                            <Button size="small" color="error" startIcon={<CancelIcon />} sx={{ padding: '1px', fontSize: '.75rem' }}>cancel</Button>
                            <Button
                                size="small"
                                color="error"
                                startIcon={<CancelIcon />}
                                sx={{ padding: '1px', fontSize: '.75rem' }}
                                onClick={(event) => {
                                    event.stopPropagation();
                                    onCancel(record);
                                }}
                            >
                                {translate('ra.action.cancel')}
                            </Button>
                        )
                    )} />
                </StyledDatagrid>