From f2833c7f3e01c997e94a66bd5dd9be738b5c6cc7 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 26 六月 2025 13:31:08 +0800
Subject: [PATCH] 波次任务下发功能优化

---
 rsf-admin/src/page/task/TaskList.jsx |   30 +++++++++++-------------------
 1 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/rsf-admin/src/page/task/TaskList.jsx b/rsf-admin/src/page/task/TaskList.jsx
index 5d40fac..b460c03 100644
--- a/rsf-admin/src/page/task/TaskList.jsx
+++ b/rsf-admin/src/page/task/TaskList.jsx
@@ -131,13 +131,7 @@
             >
                 <StyledDatagrid
                     preferenceKey='task'
-                    bulkActionButtons={false
-                        // <>
-                        //     <BulkResortButton />
-                        //     <BulkCancelButton />
-                        //     <BulkDeleteButton mutationMode={OPERATE_MODE} />
-                        // </>
-                    }
+                    bulkActionButtons={false}
                     rowClick={false}
                     expand={<TaskPanel />}
                     expandSingle={true}
@@ -255,7 +249,7 @@
         }
     }
     return (
-        ((record?.taskStatus < 98) || (record?.taskType >= 101 && record?.taskStatus < 198)) ? (<ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskAltIcon />} onConfirm={clickComplete} />) : (<></>)
+        ((record?.taskStatus < 98) || (record?.taskType >= 101 && record?.taskStatus < 198)) || (record?.taskType == 11 && record?.taskStatus == 101) ? (<ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskAltIcon />} onConfirm={clickComplete} />) : (<></>)
     )
 }
 
@@ -267,13 +261,11 @@
     const record = useRecordContext();
     const notify = useNotify();
     const refresh = useRefresh();
-    const clickCancel = (event) => {
-        event.stopPropagation();
+    const clickCancel = () => {
         cancleTask(record)
     };
     //鍙栨秷浠诲姟
     const cancleTask = async (row) => {
-        console.log(row);
         const { data: { code, data, msg } } = await request.post(`/task/remove/` + row.id);
         if (code === 200) {
             notify(msg);
@@ -284,11 +276,11 @@
     }
     return (
         (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 103 || record.taskType == 11) ?
-            <Button
-                onClick={clickCancel}
-                label="toolbar.cancel">
-                <CancelIcon />
-            </Button>
+            <ConfirmButton
+                onConfirm={clickCancel}
+                startIcon={<CancelIcon />}
+                label={"toolbar.cancel"}>
+            </ConfirmButton>
             :
             <></>
     )
@@ -313,7 +305,7 @@
             refresh();
         } else {
             notify(msg);
-        } 
+        }
     }
     return (
         (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 103 || record.taskType == 11) ?
@@ -322,8 +314,8 @@
                 label="toolbar.top">
                 <AlignVerticalTopIcon />
             </Button>
-        :
-        <></>
+            :
+            <></>
     )
 }
 

--
Gitblit v1.9.1