From 4a1418240adea7f3e1a7bf058d44197499e4a4cc Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 24 九月 2024 10:35:04 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/bus/BusList.jsx         |   17 ++++++++++++++++-
 zy-acs-flow/src/i18n/core/chineseMessages.js |    4 ++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/zy-acs-flow/src/i18n/core/chineseMessages.js b/zy-acs-flow/src/i18n/core/chineseMessages.js
index e91d51f..04ce7db 100644
--- a/zy-acs-flow/src/i18n/core/chineseMessages.js
+++ b/zy-acs-flow/src/i18n/core/chineseMessages.js
@@ -89,14 +89,14 @@
             bulk_delete_content:
                 'Are you sure you want to delete this %{name}? |||| Are you sure you want to delete these %{smart_count} items?',
             bulk_delete_title:
-                'Delete %{name} |||| Delete %{smart_count} %{name}',
+                '鍒犻櫎 %{name} |||| Delete %{smart_count} %{name}',
             bulk_update_content:
                 'Are you sure you want to update this %{name}? |||| Are you sure you want to update these %{smart_count} items?',
             bulk_update_title:
                 'Update %{name} |||| Update %{smart_count} %{name}',
             clear_array_input: 'Are you sure you want to clear the whole list?',
             delete_content: '鎮ㄧ‘瀹炶鍒犻櫎姝ら」鍚楋紵',
-            delete_title: 'Delete %{name} #%{id}',
+            delete_title: '鍒犻櫎 %{name} #%{id}',
             details: 'Details',
             error: "A client error occurred and your request couldn't be completed.",
 
diff --git a/zy-acs-flow/src/page/bus/BusList.jsx b/zy-acs-flow/src/page/bus/BusList.jsx
index 1669223..fb3d176 100644
--- a/zy-acs-flow/src/page/bus/BusList.jsx
+++ b/zy-acs-flow/src/page/bus/BusList.jsx
@@ -99,6 +99,10 @@
     const [createDialog, setCreateDialog] = useState(false);
     const [drawerVal, setDrawerVal] = useState(false);
 
+    const onCancel = (onCancel) => {
+        alert(onCancel.busNo);
+    }
+
     return (
         <Box display="flex">
             <List
@@ -167,7 +171,18 @@
                     <FunctionField label="common.field.opt" cellClassName="opt" render={record => (
                         (record.busSts === 15 || true) && (
                             // <DeleteButton label="" sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
-                            <Button size="small" color="error" startIcon={<CancelIcon />} sx={{ padding: '1px', fontSize: '.75rem' }}>cancel</Button>
+                            <Button
+                                size="small"
+                                color="error"
+                                startIcon={<CancelIcon />}
+                                sx={{ padding: '1px', fontSize: '.75rem' }}
+                                onClick={(event) => {
+                                    event.stopPropagation();
+                                    onCancel(record);
+                                }}
+                            >
+                                {translate('ra.action.cancel')}
+                            </Button>
                         )
                     )} />
                 </StyledDatagrid>

--
Gitblit v1.9.1