From 7172f29c54a04164674212f4ead303603dff0548 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 01 七月 2025 16:16:34 +0800
Subject: [PATCH] 波次终止前端修改

---
 rsf-admin/src/page/orders/wave/WaveList.jsx |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/rsf-admin/src/page/orders/wave/WaveList.jsx b/rsf-admin/src/page/orders/wave/WaveList.jsx
index c0d43c4..3b9de8c 100644
--- a/rsf-admin/src/page/orders/wave/WaveList.jsx
+++ b/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 (

--
Gitblit v1.9.1