| | |
| | | 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"; |
| | |
| | | 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, |
| | |
| | | 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" /> |
| | |
| | | <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> |
| | |
| | | <> |
| | | <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' /> |
| | | ) |
| | | } |
| | | |
| | |
| | | notify(msg); |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | refresh() |
| | | } |
| | | return ( |