#
luxiaotao1123
2024-04-09 1421b830cf462e7eeb47bbae4e5d467bd43465fd
#
1个文件已修改
1个文件已添加
74 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/map/drawer/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/lift/index.jsx 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -8,6 +8,7 @@
import AgvDrawer from './agv';
import PointDrawer from './point'
import ShuttleDrawer from './shuttle'
import LiftDrawer from './lift'
const useStyles = createStyles(({ token, css }) => {
@@ -21,7 +22,7 @@
    const [drawerTitle, setDrawerTitle] = useState('');
    useEffect(() => {
        console.log(props.curSprite?.data);
    }, [props.curSprite]);
    const handleCancel = () => {
@@ -49,7 +50,7 @@
                    </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}
@@ -58,6 +59,15 @@
                        />
                    </>
                )}
                {(props.curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && props.curSprite?.data?.shelfType === Utils.SHELF_TYPE.LIFT) && (
                    <>
                        <LiftDrawer
                            curSprite={curSprite}
                            curFloor={curFloor}
                            setDrawerTitle={setDrawerTitle}
                        />
                    </>
                )}
                {props.curSprite?.data?.type === Utils.SENSOR_TYPE.CONVEYOR && (
                    <>
                        <ConveyorDrawer
zy-asrs-flow/src/pages/map/drawer/lift/index.jsx
New file
@@ -0,0 +1,60 @@
import React, { useState, useRef, useEffect } from 'react';
import { Card, Form, Button } from 'antd';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
import { createStyles } from 'antd-style';
import * as Utils from '../../utils'
import Http from '@/utils/http';
import ShowJson from '../showJson';
const useStyles = createStyles(({ token, css }) => {
})
const LiftDrawer = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    const [activeTabKey, setActiveTabKey] = useState('json');
    const contentList = {
        json: (
            <ShowJson
                data={props.curSprite.data}
            />
        ),
    };
    return (
        <>
            <Card
                className='drawer-card'
                hoverable
                bordered={false}
                type='inner'
                tabList={[
                    {
                        key: 'json',
                        tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
                    },
                ]}
                activeTabKey={activeTabKey}
                onTabChange={(key) => {
                    setActiveTabKey(key)
                }}
                tabProps={{
                    centered: true,
                    size: 'large',
                    type: "card",
                    style: {
                    }
                }}
                style={{
                    height: '100%'
                }}
            >
                {contentList[activeTabKey]}
            </Card>
        </>
    )
}
export default LiftDrawer;