#
luxiaotao1123
2024-03-18 9c1904b07994f1f8685b3f2087c035627d0afd69
#
3个文件已修改
1个文件已添加
83 ■■■■■ 已修改文件
zy-asrs-flow/src/locales/en-US/map.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/shelf/json.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/locales/en-US/map.ts
@@ -17,6 +17,12 @@
    '': '',
    '': '',
    '': '',
    'map.drawer.json': 'JSON',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    'map.settings.more': 'More',
zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -36,7 +36,7 @@
                        <Button onClick={handleCancel}>
                            <FormattedMessage id='common.cancel' defaultMessage='取消' />
                        </Button>
                        <Button onClick={handleOk} type="primary">
                        <Button hidden={true} onClick={handleOk} type="primary">
                            <FormattedMessage id='common.submit' defaultMessage='保存' />
                        </Button>
                    </Space>
zy-asrs-flow/src/pages/map/drawer/shelf/index.jsx
@@ -1,9 +1,10 @@
import React, { useState, useRef, useEffect } from 'react';
import { Drawer, Space, Button } from 'antd';
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 JSON from './json';
const useStyles = createStyles(({ token, css }) => {
@@ -12,6 +13,22 @@
const ShelfDrawer = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    const [activeTabKey, setActiveTabKey] = useState('json');
    const [jsonForm] = Form.useForm();
    const contentList = {
        json: (
            <JSON
                refCurr={props.refCurr}
                curSprite={props.curSprite}
                setSpriteBySettings={props.setSpriteBySettings}
                setDidClickSprite={props.setDidClickSprite}
                onSubmit={props.onSubmit}
                jsonForm={jsonForm}
            />
        ),
    };
    const handleCancel = () => {
        props.onCancel();
@@ -22,7 +39,37 @@
    return (
        <>
        <h1>Shelf</h1>
            <Card
                hoverable
                bordered={false}
                type='inner'
                tabList={[
                    {
                        key: 'json',
                        tab: intl.formatMessage({ id: 'map.drawer.json', defaultMessage: 'JSON' }),
                        // icon: <BorderOuterOutlined />
                    },
                    {
                        key: 'config',
                        tab: intl.formatMessage({ id: 'map.settings.config.param', defaultMessage: '系统参数' }),
                        // icon: <BranchesOutlined />
                    },
                ]}
                activeTabKey={activeTabKey}
                onTabChange={(key) => {
                    setActiveTabKey(key)
                }}
                tabProps={{
                    centered: true,
                    size: 'large',
                    type: "card",
                    style: {
                    }
                }}
            >
                {contentList[activeTabKey]}
            </Card>
        </>
    )
}
zy-asrs-flow/src/pages/map/drawer/shelf/json.jsx
New file
@@ -0,0 +1,24 @@
import React, { useState, useRef, useEffect } from 'react';
import { Card, Space, 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';
const useStyles = createStyles(({ token, css }) => {
})
const JSON = () => {
    return (
        <>
            <h1>JSON</h1>
        </>
    )
}
export default JSON;