skyouc
2025-07-01 7172f29c54a04164674212f4ead303603dff0548
rsf-admin/src/page/orders/wave/WaveList.jsx
@@ -29,6 +29,7 @@
import PlayArrowOutlinedIcon from '@mui/icons-material/PlayArrowOutlined';
import PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline';
import StopCircleOutlinedIcon from '@mui/icons-material/StopCircleOutlined';
import StopOutlinedIcon from '@mui/icons-material/StopOutlined';
import { Box, Typography, Card, Stack, LinearProgress } from '@mui/material';
import ConfirmButton from "../../components/ConfirmButton";
import PageDrawer from "../../components/PageDrawer";
@@ -109,9 +110,11 @@
    return (
        <Box display="flex">
            <List
                queryOptions={{ refetchInterval: 5000 }}
                sx={{
                    flexGrow: 1,
                    "& .css-k008qs": {
                        display: 'block'
                    },
                    transition: (theme) =>
                        theme.transitions.create(['all'], {
                            duration: theme.transitions.duration.enteringScreen,
@@ -142,7 +145,7 @@
                    rowClick={(id, resource, record) => false}
                    expand={<WavePannel />}
                    expandSingle={true}
                    omit={['id', 'createTime', 'createBy', 'memo', 'createBy$']}
                    omit={['id', 'createTime', 'createBy', 'createBy$']}
                >
                    <NumberField source="id" />
                    <TextField source="code" label="table.field.wave.code" />
@@ -159,9 +162,9 @@
                    <CustomProcess source="progress" />
                    <TextField source="exceStatus$" label="table.field.wave.exceStatus" sortable={false} />
                    <WrapperField cellClassName="opt" label="common.field.opt">
                        <PublicTaskButton setSelectIds={setSelectIds} setDetailDialog={setDetailDialog} />
                        <PauseButton />
                        <ContinueButton />
                        <StopWaveButton />
                        <EditButton label="toolbar.detail" sx={{ padding: '1px', fontSize: '.75rem' }} />
                    </WrapperField>
                </StyledDatagrid>
@@ -214,6 +217,28 @@
        <>
            <LinearProgress variant="determinate" value={progress} />
        </>
    )
}
const StopWaveButton = () => {
    const record = useRecordContext()
    const translate = useTranslate()
    const refresh = useRefresh()
    const notify = useNotify()
    const stopClick = async (event) => {
        event.stopPropagation()
        const { data: { code, data, msg } } = await request.post('', { val: true, flag: 'WaveAutoExce' });
        if (code === 200) {
            notify(msg);
        } else {
            notify(msg);
        }
    }
    return (
        <ConfirmButton label={"toolbar.stopPub"} startIcon={<StopOutlinedIcon />} onConfirm={stopClick} size='small' />
    )
}
@@ -297,7 +322,7 @@
            notify(msg);
        } else {
            notify(msg);
        }
        }
        refresh()
    }
    return (