#
Junjie
2024-10-17 d835d1b51f832889929cdf69010034a30ef44d02
zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -4,9 +4,11 @@
import { createStyles } from 'antd-style';
import * as Utils from '../utils'
import ShelfDrawer from './shelf';
import ConveyorDrawer from './conveyor';
import AgvDrawer from './agv';
import PointDrawer from './point'
import ShuttleDrawer from './shuttle'
import LiftDrawer from './lift'
const useStyles = createStyles(({ token, css }) => {
@@ -18,9 +20,11 @@
    const { curSprite, curFloor } = props;
    const [drawerTitle, setDrawerTitle] = useState('');
    const [drawerWidth, setDrawerWidth] = useState(() => {
        return window.innerWidth * 0.35;
    })
    useEffect(() => {
    }, [props.curSprite]);
    const handleCancel = () => {
@@ -36,7 +40,7 @@
                getContainer={props.refCurr}
                rootStyle={{ position: "absolute" }}
                mask={false}
                width={window.innerWidth * 0.35}
                width={drawerWidth}
                style={{
                    opacity: 1
                }}
@@ -48,12 +52,33 @@
                    </Space>
                }
            >
                {props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
                {(props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && props.curSprite?.data?.shelfType !== Utils.SHELF_TYPE.LIFT) && (
                    <>
                        <ShelfDrawer
                            curSprite={curSprite}
                            curFloor={curFloor}
                            setDrawerTitle={setDrawerTitle}
                            setDrawerWidth={setDrawerWidth}
                        />
                    </>
                )}
                {(props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && props.curSprite?.data?.shelfType === Utils.SHELF_TYPE.LIFT) && (
                    <>
                        <LiftDrawer
                            curSprite={curSprite}
                            curFloor={curFloor}
                            setDrawerTitle={setDrawerTitle}
                            setDrawerWidth={setDrawerWidth}
                        />
                    </>
                )}
                {props.curSprite?.data?.type === Utils.SENSOR_TYPE.CONVEYOR && (
                    <>
                        <ConveyorDrawer
                            curSprite={curSprite}
                            curFloor={curFloor}
                            setDrawerTitle={setDrawerTitle}
                            setDrawerWidth={setDrawerWidth}
                        />
                    </>
                )}
@@ -63,6 +88,8 @@
                            curSprite={curSprite}
                            curFloor={curFloor}
                            setDrawerTitle={setDrawerTitle}
                            setDrawerWidth={setDrawerWidth}
                            refCurr={props.refCurr}
                        />
                    </>
                )}