1
zhang
2 天以前 9f7d850f985cbd1756798329b9a3669dae51ac48
zy-acs-flow/src/page/segment/SegmentList.jsx
@@ -33,6 +33,7 @@
    FunctionField,
    Count,
    useNotify,
    useRefresh,
} from 'react-admin';
import { Box, Typography, Stack, useMediaQuery, Tabs, Tab, Divider } from '@mui/material';
import { styled } from '@mui/material/styles';
@@ -57,7 +58,7 @@
    '& .column-name': {
    },
    '& .opt': {
        width: 120
        width: 130
    },
}));
@@ -144,7 +145,8 @@
const TabbedDatagrid = () => {
    const translate = useTranslate();
      const notify = useNotify();
    const notify = useNotify();
    const refresh = useRefresh();
    const { filterValues, setFilters, displayedFilters } = useListContext();
    const isXSmall = useMediaQuery(theme =>
        theme.breakpoints.down('sm')
@@ -258,29 +260,33 @@
                                    <DateField source="createTime" label="common.field.createTime" showTime />
                                    <BooleanField source="statusBool" label="common.field.status" sortable={false} />
                                    <TextField source="memo" label="common.field.memo" sortable={false} />
                                    {filterValues.state === 'RUNNING' && (
                                        <FunctionField label="common.field.opt" cellClassName="opt" render={record => (
                                            <>
                                                <ConfirmButton
                                                    label="common.action.deprecate"
                                                    size="small"
                                                    color="error"
                                                    startIcon={<ClearIcon />}
                                                    sx={{
                                                        padding: '1px',
                                                        fontSize: '.75rem',
                                                        '& .MuiButton-startIcon': {
                                                            marginRight: '2px'
                                                        },
                                                    }}
                                                    data={record.id}
                                                    onConfirm={() => {
                                                        handleDeprecate(record.id);
                                                    }}
                                                />
                                            </>
                                        )} />
                                    )}
                                    {(
                                        filterValues.state === 'INIT'
                                        || filterValues.state === 'WAITING'
                                        || filterValues.state === 'RUNNING'
                                    ) && (
                                            <FunctionField label="common.field.opt" cellClassName="opt" render={record => (
                                                <>
                                                    <ConfirmButton
                                                        label="common.action.deprecate"
                                                        size="small"
                                                        color="inherit"
                                                        startIcon={<ClearIcon />}
                                                        sx={{
                                                            padding: '1px',
                                                            fontSize: '.75rem',
                                                            '& .MuiButton-startIcon': {
                                                                marginRight: '2px'
                                                            },
                                                        }}
                                                        data={record.id}
                                                        onConfirm={() => {
                                                            handleDeprecate(record.id);
                                                        }}
                                                    />
                                                </>
                                            )} />
                                        )}
                                </StyledDatagrid>
                            </>
                        )}