skyouc
2025-06-18 2b21366205c895a61897726fcd1aa432fdc477c8
rsf-admin/src/page/orders/wave/WaveList.jsx
@@ -8,34 +8,26 @@
    SelectColumnsButton,
    EditButton,
    FilterButton,
    CreateButton,
    ExportButton,
    BulkDeleteButton,
    WrapperField,
    useRecordContext,
    useTranslate,
    useNotify,
    useListContext,
    FunctionField,
    TextField,
    NumberField,
    DateField,
    BooleanField,
    ReferenceField,
    TextInput,
    DateTimeInput,
    DateInput,
    SelectInput,
    NumberInput,
    ReferenceInput,
    ReferenceArrayInput,
    AutocompleteInput,
    DeleteButton,
    useRefresh,
    useRedirect,
    Button,
} from 'react-admin';
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import PlayArrowOutlinedIcon from '@mui/icons-material/PlayArrowOutlined';
import PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline';
import { Box, Typography, Card, Stack } from '@mui/material';
import ConfirmButton from "../../components/ConfirmButton";
import PageDrawer from "../../components/PageDrawer";
@@ -118,6 +110,8 @@
                sort={{ field: "create_time", order: "desc" }}
                actions={(
                    <TopToolbar>
                        <BulkStartButton />
                        <BulkPauseButton />
                        <FilterButton />
                        <SelectColumnsButton preferenceKey='wave' />
                    </TopToolbar>
@@ -186,4 +180,26 @@
    return (
        record?.exceStatus == 0 ? <ConfirmButton label={"toolbar.createTask"} startIcon={<PublicIcon />} onConfirm={pubClick} size='small' /> : <></>
    );
}
const BulkStartButton = () => {
    const { data, selectedIds, onUnselectItems } = useListContext();
    const startClick = () => {
        onUnselectItems()
    }
    return (
        <Button label="toolbar.start" onClick={startClick} startIcon={<PlayArrowOutlinedIcon />}  />
    )
}
const BulkPauseButton = () => {
    const { data, selectedIds, onUnselectItems } = useListContext();
    const pauseClick = () => {
        onUnselectItems()
    }
    return (
        <Button label="toolbar.pause" onClick={pauseClick} startIcon={<PauseCircleOutlineIcon />}  />
    )
}