From 3512ff73239775ff866e73f3da2c5eac2f8e2494 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 03 四月 2024 08:50:04 +0800
Subject: [PATCH] Merge branch 'Four-Way-Rack' of http://47.97.1.152:5880/r/zy-asrs-master into Four-Way-Rack

---
 zy-asrs-flow/src/pages/map/drawer/index.jsx |   44 ++++++++++++++++++++++++++++++++++----------
 1 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/drawer/index.jsx b/zy-asrs-flow/src/pages/map/drawer/index.jsx
index ba3c763..17ac267 100644
--- a/zy-asrs-flow/src/pages/map/drawer/index.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -3,9 +3,10 @@
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
 import { createStyles } from 'antd-style';
 import * as Utils from '../utils'
-import Http from '@/utils/http';
 import ShelfDrawer from './shelf';
 import AgvDrawer from './agv';
+import PointDrawer from './point'
+import ShuttleDrawer from './shuttle'
 
 const useStyles = createStyles(({ token, css }) => {
 
@@ -14,30 +15,35 @@
 const MapDrawer = (props) => {
     const intl = useIntl();
     const { styles } = useStyles();
+    const { curSprite, curFloor } = props;
+
+    const [drawerTitle, setDrawerTitle] = useState('');
+
+    useEffect(() => {
+
+    }, [props.curSprite]);
 
     const handleCancel = () => {
         props.onCancel();
     };
 
-    const handleOk = () => {
-    }
-
     return (
         <>
             <Drawer
+                title={drawerTitle}
                 open={props.open}
                 onClose={handleCancel}
                 getContainer={props.refCurr}
                 rootStyle={{ position: "absolute" }}
                 mask={false}
-                width={600}
+                width={window.innerWidth * 0.35}
+                style={{
+                    opacity: 1
+                }}
                 extra={
                     <Space>
                         <Button onClick={handleCancel}>
                             <FormattedMessage id='common.cancel' defaultMessage='鍙栨秷' />
-                        </Button>
-                        <Button onClick={handleOk} type="primary">
-                            <FormattedMessage id='common.submit' defaultMessage='淇濆瓨' />
                         </Button>
                     </Space>
                 }
@@ -45,14 +51,32 @@
                 {props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
                     <>
                         <ShelfDrawer
-
+                            curSprite={curSprite}
+                            curFloor={curFloor}
+                            setDrawerTitle={setDrawerTitle}
+                        />
+                    </>
+                )}
+                {props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHUTTLE && (
+                    <>
+                        <ShuttleDrawer
+                            curSprite={curSprite}
+                            curFloor={curFloor}
+                            setDrawerTitle={setDrawerTitle}
+                        />
+                    </>
+                )}
+                {props.curSprite?.data?.type === Utils.SENSOR_TYPE.POINT && (
+                    <>
+                        <PointDrawer
+                            curSprite={curSprite}
                         />
                     </>
                 )}
                 {props.curSprite?.data?.type === Utils.SENSOR_TYPE.AGV && (
                     <>
                         <AgvDrawer
-
+                            curSprite={curSprite}
                         />
                     </>
                 )}

--
Gitblit v1.9.1