Junjie
2024-04-03 28cd840d5d383968bf1a2269193b18fa8e530725
zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -5,6 +5,8 @@
import * as Utils from '../utils'
import ShelfDrawer from './shelf';
import AgvDrawer from './agv';
import PointDrawer from './point'
import ShuttleDrawer from './shuttle'
const useStyles = createStyles(({ token, css }) => {
@@ -13,7 +15,13 @@
const MapDrawer = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    const { curSprite } = props;
    const { curSprite, curFloor } = props;
    const [drawerTitle, setDrawerTitle] = useState('');
    useEffect(() => {
    }, [props.curSprite]);
    const handleCancel = () => {
        props.onCancel();
@@ -22,14 +30,15 @@
    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: .8
                    opacity: 1
                }}
                extra={
                    <Space>
@@ -43,6 +52,24 @@
                    <>
                        <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}
                        />
                    </>
                )}