From 332b916c0984a116191e882606d70d4c0c3691f0 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期二, 01 七月 2025 10:09:50 +0800 Subject: [PATCH] no message --- rsf-admin/src/page/orders/wave/WaveItemList.jsx | 69 ---------------------------------- 1 files changed, 1 insertions(+), 68 deletions(-) diff --git a/rsf-admin/src/page/orders/wave/WaveItemList.jsx b/rsf-admin/src/page/orders/wave/WaveItemList.jsx index b9649a9..e5c302b 100644 --- a/rsf-admin/src/page/orders/wave/WaveItemList.jsx +++ b/rsf-admin/src/page/orders/wave/WaveItemList.jsx @@ -110,11 +110,7 @@ > <StyledDatagrid preferenceKey='waveItem' - bulkActionButtons={ - <> - <BulkStartButton /> - </> - } + bulkActionButtons={false} rowClick={(id, resource, record) => false} expand={false} expandSingle={false} @@ -138,10 +134,6 @@ <DateField source="createTime" label="common.field.createTime" showTime /> <TextField source="memo" label="common.field.memo" sortable={false} /> <TextField source="exceStatus$" label="table.field.waveItem.exceStatus" /> - <WrapperField cellClassName="opt" label="common.field.opt"> - <PauseButton /> - <ContinueButton /> - </WrapperField> </StyledDatagrid> </List> <WaveItemEdit @@ -170,66 +162,7 @@ event.stopPropagation() setEditDialog(true) } - return ( <Button label="ra.action.edit" onClick={editClick} startIcon={<ContentCreate />} /> ) } - - -const BulkStartButton = () => { - const { data, selectedIds, onUnselectItems } = useListContext(); - const waveId = useGetRecordId(); - const notify = useNotify(); - const refresh = useRefresh() - const startClick = async () => { - onUnselectItems(); - const { data: { code, data, msg } } = await request.post('/wave/selects/task', { wave: waveId, waveItem: selectedIds }); - if (code === 200) { - notify(msg); - setAutoExce(false) - } else { - notify(msg); - } - refresh() - } - return ( - <Button label="toolbar.publicWorking" onClick={startClick} startIcon={<PlayArrowOutlinedIcon />} variant="outlined" /> - ) -} - -const PauseButton = () => { - const notify = useNotify() - const refresh = useRefresh(); - const record = useRecordContext(); - const pauseClick = async () => { - const { data: { code, data, msg } } = await request.post('/waveItem/pause/pub/' + record?.id); - if (code === 200) { - notify(msg); - } else { - notify(msg); - } - refresh() - } - return ( - record?.exceStatus == 1 ? <Button label="toolbar.pause" onClick={pauseClick} startIcon={<StopCircleOutlinedIcon />} /> : <></> - ) -} - -const ContinueButton = () => { - const notify = useNotify() - const refresh = useRefresh(); - const record = useRecordContext(); - const continueClick = async () => { - const { data: { code, data, msg } } = await request.post('/waveItem/continue/pub/' + record?.id); - if (code === 200) { - notify(msg); - } else { - notify(msg); - } - refresh() - } - return ( - record?.exceStatus == 2 ? <Button label="toolbar.continuePub" onClick={continueClick} startIcon={<PauseCircleOutlineIcon />} /> : <></> - ) -} \ No newline at end of file -- Gitblit v1.9.1