From a908604f5aa2da9921cd99c12a6fa422d5893f4a Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 11 十月 2024 15:17:04 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/settings/index.jsx |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/zy-acs-flow/src/map/settings/index.jsx b/zy-acs-flow/src/map/settings/index.jsx
index 22a7176..56096a3 100644
--- a/zy-acs-flow/src/map/settings/index.jsx
+++ b/zy-acs-flow/src/map/settings/index.jsx
@@ -4,9 +4,10 @@
 import CloseIcon from '@mui/icons-material/Close';
 import { PAGE_DRAWER_WIDTH } from '@/config/setting';
 import MapSettings from './MapSettings';
+import ConfigSettings from './ConfigSettings';
 
 const Settings = (props) => {
-    const { open, onCancel, sprite, width = PAGE_DRAWER_WIDTH, title } = props;
+    const { open, onCancel, sprite, width = PAGE_DRAWER_WIDTH, title, setSpriteSettings } = props;
     const theme = useTheme();
     const themeMode = theme.palette.mode;
     const translate = useTranslate();
@@ -22,7 +23,9 @@
     };
 
     useEffect(() => {
-    }, [])
+        console.log(sprite);
+
+    }, [sprite])
 
     return (
         <>
@@ -38,7 +41,9 @@
                     }}>
                         <Stack direction="row" p={2}>
                             <Typography variant="h6" flex="1">
-                                {title || translate('page.map.settings.title')}
+                                {sprite
+                                    ? translate(`page.map.devices.${sprite?.data?.type?.toLowerCase()}`) + ' - ' + sprite?.data?.uuid
+                                    : translate('page.map.settings.title')}
                             </Typography>
                             <IconButton onClick={handleClose} size="small">
                                 <CloseIcon />
@@ -73,16 +78,16 @@
                                         {activeTab === 0 && (
                                             <MapSettings
                                                 sprite={sprite}
+                                                setSpriteSettings={setSpriteSettings}
                                                 onSubmit={() => {
-                                                    alert('MapSettings')
                                                 }}
+                                                width={width}
                                             />
                                         )}
                                         {activeTab === 1 && (
                                             <ConfigSettings
                                                 sprite={sprite}
                                                 onSubmit={() => {
-                                                    alert('ConfigSettings')
                                                 }}
                                             />
                                         )}
@@ -94,13 +99,6 @@
                 )}
             </Drawer>
         </>
-    )
-}
-
-const ConfigSettings = () => {
-
-    return (
-        <h1>ConfigSettings</h1>
     )
 }
 

--
Gitblit v1.9.1