Junjie
2024-03-28 c4b00b0268f35a7a9e016e818b0f6e27bc3876f0
zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
@@ -4,7 +4,8 @@
import { createStyles } from 'antd-style';
import * as Utils from '../../utils'
import Http from '@/utils/http';
import ShowJson from './showJson';
import ShowJson from '../showJson';
import ShelfView from './view'
const useStyles = createStyles(({ token, css }) => {
@@ -13,14 +14,17 @@
const ShelfDrawer = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    const [activeTabKey, setActiveTabKey] = useState('json');
    const { curSprite } = props;
    const [activeTabKey, setActiveTabKey] = useState('view');
    const contentList = {
        view: (
            <ShelfView
                data={props.curSprite.data}
            />
        ),
        json: (
            <ShowJson
                curSprite={props.curSprite}
                data={props.curSprite.data}
            />
        ),
    };
@@ -28,10 +32,15 @@
    return (
        <>
            <Card
                className='drawer-card'
                hoverable
                bordered={false}
                type='inner'
                tabList={[
                    {
                        key: 'view',
                        tab: intl.formatMessage({ id: 'map.drawer.shelf.view.title', defaultMessage: '库位信息' }),
                    },
                    {
                        key: 'json',
                        tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
@@ -49,7 +58,7 @@
                    }
                }}
                style={{
                    height: '100%',
                    height: '100%'
                }}
            >
                {contentList[activeTabKey]}