#
luxiaotao1123
2024-04-12 83d10b3c56e12353d877380f7d5f8130ae723124
#
4个文件已修改
1个文件已添加
78 ■■■■■ 已修改文件
zy-asrs-flow/src/locales/en-US/map.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/shuttle/handle.jsx 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/locales/en-US/map.ts
@@ -29,6 +29,7 @@
    'map.enable': 'Enable',
    'map.diable': 'Disable',
    'map.handle': 'Handle',
    'map.command': 'Command',
    'map.loc.sts': 'Location Status',
    'map.loc.operation': 'Location Operation',
    'map.loc.lock': 'Lock',
zy-asrs-flow/src/pages/map/drawer/index.jsx
@@ -89,6 +89,7 @@
                            curFloor={curFloor}
                            setDrawerTitle={setDrawerTitle}
                            setDrawerWidth={setDrawerWidth}
                            refCurr={props.refCurr}
                        />
                    </>
                )}
zy-asrs-flow/src/pages/map/drawer/shuttle/handle.jsx
New file
@@ -0,0 +1,53 @@
import React, { useState, useRef, useEffect } from 'react';
import { Col, Form, Input, Row, Switch, Slider, message, Drawer, Space, Button, InputNumber, Segmented } from 'antd';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
import { createStyles } from 'antd-style';
import Http from '@/utils/http';
const useStyles = createStyles(({ token, css }) => {
})
const ShuttleHandle = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    useEffect(() => {
    }, []);
    const handleCancel = () => {
        props.onClose();
    }
    return (
        <>
            <Drawer
                title={intl.formatMessage({ id: 'map.command', defaultMessage: '命令' })}
                width={350}
                closable={false}
                open={props.open}
                getContainer={props.refCurr}
                rootStyle={{ position: "absolute" }}
                onClose={handleCancel}
                extra={
                    <Space>
                        <Button onClick={handleCancel}>
                            <FormattedMessage id='common.cancel' defaultMessage='取消' />
                        </Button>
                        {/* <Button onClick={handleOk} type="primary">
                            <FormattedMessage id='common.submit' defaultMessage='确定' />
                        </Button> */}
                    </Space>
                }
            >
                <h1>asds</h1>
            </Drawer>
        </>
    )
}
export default ShuttleHandle;
zy-asrs-flow/src/pages/map/drawer/shuttle/index.jsx
@@ -31,6 +31,7 @@
                curNo={curNo}
                data={curSprite.data}
                curFloor={curFloor}
                refCurr={props.refCurr}
            />
        ),
        json: (
zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
@@ -5,6 +5,7 @@
import * as Utils from '../../utils'
import Http from '@/utils/http';
import BoolValueIcon from '@/components/BoolValueIcon';
import ShuttleHandle from './handle';
const useStyles = createStyles(({ token, css }) => {
    return {
@@ -29,7 +30,7 @@
})
const updateEnable = async (deviceNo, enable) => {
    const resp = await Http.doPost('api/dict/update', {val});
    const resp = await Http.doPost('api/dict/update', { val });
    if (resp.code === 200) {
        message.success(intl.formatMessage({ id: 'page.update.success', defaultMessage: '更新成功' }));
        return true;
@@ -45,6 +46,7 @@
    const { data } = props;
    const [loading, setLoading] = React.useState(false);
    const [childrenDrawer, setChildrenDrawer] = useState(false);
    const [info, setInfo] = React.useState(null);
    useEffect(() => {
@@ -110,7 +112,7 @@
                                        label: intl.formatMessage({ id: 'map.dest.loc', defaultMessage: '目标库位' }),
                                        children: info?.destLocNo,
                                    },
                                    {
                                        label: intl.formatMessage({ id: 'map.shuttle.batter.power', defaultMessage: '电池电量' }),
                                        children: info?.batteryPower,
@@ -158,7 +160,13 @@
                                                <Button className={styles.tableButton} size='default' disabled>
                                                    <FormattedMessage id='map.enable' defaultMessage='启用' />
                                                </Button>
                                                <Button className={styles.tableButton} size='default'>
                                                <Button
                                                    className={styles.tableButton}
                                                    size='default'
                                                    onClick={() => {
                                                        setChildrenDrawer(true);
                                                    }}
                                                >
                                                    <FormattedMessage id='map.handle' defaultMessage='手动操作' />
                                                </Button>
                                            </>
@@ -167,6 +175,14 @@
                                ]
                            }
                        />
                        <ShuttleHandle
                            open={childrenDrawer}
                            refCurr={props.refCurr}
                            shuttleNo={data.no}
                            onClose={() => {
                                setChildrenDrawer(false)
                            }}
                        />
                    </div>
                )}
            </div>