From 7a4e91b335fabe83fc7bd9cef007d93438a48f3f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 12 四月 2024 16:56:46 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/locales/en-US/map.ts              |    3 +++
 zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx |   19 ++++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/zy-asrs-flow/src/locales/en-US/map.ts b/zy-asrs-flow/src/locales/en-US/map.ts
index 5e5d505..9e723d3 100644
--- a/zy-asrs-flow/src/locales/en-US/map.ts
+++ b/zy-asrs-flow/src/locales/en-US/map.ts
@@ -26,6 +26,9 @@
     '': '',
     'map.pallet.barcode': 'Pallet Barcode',
     'map.is.enable': 'Enable or Not',
+    'map.enable': 'Enable',
+    'map.diable': 'Disable',
+    'map.handle': 'Handle',
     'map.loc.sts': 'Location Status',
     'map.loc.operation': 'Location Operation',
     'map.loc.lock': 'Lock',
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
index 11332b5..8aea51c 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
@@ -28,7 +28,16 @@
     }
 })
 
-
+const updateEnable = async (deviceNo, enable) => {
+    const resp = await Http.doPost('api/dict/update', {val});
+    if (resp.code === 200) {
+        message.success(intl.formatMessage({ id: 'page.update.success', defaultMessage: '鏇存柊鎴愬姛' }));
+        return true;
+    } else {
+        message.error(resp.msg);
+        return false;
+    }
+}
 
 const ShuttleView = (props) => {
     const intl = useIntl();
@@ -136,7 +145,7 @@
                                     },
                                     {
                                         label: intl.formatMessage({ id: 'map.is.enable', defaultMessage: '鏄惁鍚敤' }),
-                                        children: 'Disabled',
+                                        children: <BoolValueIcon value={info?.enable} />,
                                     },
                                     {
                                         label: intl.formatMessage({ id: 'map.loc.operation', defaultMessage: '搴撲綅鎿嶄綔' }),
@@ -144,13 +153,13 @@
                                         children: (
                                             <>
                                                 <Button className={styles.tableButton} size='default' type="primary" danger>
-                                                    <FormattedMessage id='map.loc.lock' defaultMessage='閿佸畾' />
+                                                    <FormattedMessage id='map.diable' defaultMessage='绂佺敤' />
                                                 </Button>
                                                 <Button className={styles.tableButton} size='default' disabled>
-                                                    <FormattedMessage id='map.loc.unlock' defaultMessage='瑙i攣' />
+                                                    <FormattedMessage id='map.enable' defaultMessage='鍚敤' />
                                                 </Button>
                                                 <Button className={styles.tableButton} size='default'>
-                                                    <FormattedMessage id='map.loc.reset' defaultMessage='娓呴櫎搴撲綅' />
+                                                    <FormattedMessage id='map.handle' defaultMessage='鎵嬪姩鎿嶄綔' />
                                                 </Button>
                                             </>
                                         )

--
Gitblit v1.9.1