From 95d473bc8c09ef41e1455f93dec49c5ee6ac548f Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期二, 18 六月 2024 08:23:38 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/configSettings.jsx | 83 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 81 insertions(+), 2 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index ddbfd55..939b245 100644
--- a/zy-asrs-flow/src/pages/map/components/configSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
@@ -3,7 +3,6 @@
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
import { createStyles } from 'antd-style';
import * as Utils from '../utils'
-import * as PIXI from 'pixi.js';
const useStyles = createStyles(({ token, css }) => {
@@ -14,6 +13,8 @@
const { styles } = useStyles();
const { curSprite, configForm: form } = props;
+ const [showLiftNoItem, setShowLiftNoItem] = React.useState(false);
+
useEffect(() => {
form.resetFields();
if (curSprite) {
@@ -21,6 +22,7 @@
shelfType: Utils.SHELF_TYPE.STORE,
...curSprite.data
})
+ setShowLiftNoItem(form.getFieldValue('shelfType') === Utils.SHELF_TYPE.LIFT);
}
}, [props, form]);
@@ -77,6 +79,10 @@
no: ''
});
}
+ break;
+ case 'shelfType':
+ const shelfType = form.getFieldValue('shelfType');
+ setShowLiftNoItem(shelfType === Utils.SHELF_TYPE.LIFT);
break;
default:
break;
@@ -229,6 +235,27 @@
]}
/>
</Form.Item>
+
+ {showLiftNoItem && (
+ <>
+ <Form.Item
+ name='liftNo'
+ label={intl.formatMessage({ id: 'map.settings.lift.no', defaultMessage: '鎻愬崌鏈虹紪鍙�' })}
+ rules={[
+ {
+ required: true,
+ },
+ ]}
+ >
+ <InputNumber
+ style={{
+ width: '50%',
+ }}
+ />
+ </Form.Item>
+ </>
+ )}
+
<Form.Item
label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
>
@@ -286,6 +313,44 @@
</Space.Compact>
</Form.Item>
<Form.Item
+ label={intl.formatMessage({ id: 'map.settings.shelf.reference', defaultMessage: '鍩哄噯鍊�' })}
+ >
+ <Space.Compact>
+ <Form.Item
+ name='refx'
+ noStyle
+ rules={[
+ {
+ required: false,
+ },
+ ]}
+ >
+ <InputNumber
+ addonBefore={<Space.Compact><FormattedMessage id='map.x' defaultMessage='x' /></Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </Form.Item>
+ <Form.Item
+ name='refy'
+ noStyle
+ rules={[
+ {
+ required: false,
+ },
+ ]}
+ >
+ <InputNumber
+ addonBefore={<Space.Compact><FormattedMessage id='map.y' defaultMessage='y' /></Space.Compact>}
+ style={{
+ width: '50%',
+ }}
+ />
+ </Form.Item>
+ </Space.Compact>
+ </Form.Item>
+ <Form.Item
name='value'
label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '鍦板浘鍊�' })}
>
@@ -300,7 +365,21 @@
{curSprite?.data?.type === Utils.SENSOR_TYPE.CONVEYOR && (
<>
-
+ <Form.Item
+ name='plcNo'
+ label={intl.formatMessage({ id: 'map.settings.conveyor.plc.no', defaultMessage: 'PLC缂栧彿' })}
+ rules={[
+ {
+ required: true,
+ },
+ ]}
+ >
+ <InputNumber
+ style={{
+ width: '50%',
+ }}
+ />
+ </Form.Item>
</>
)}
--
Gitblit v1.9.1