From e9a4418c14ef68fb454300b092c413e8df259ec2 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期六, 13 四月 2024 11:50:56 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/configSettings.jsx | 45 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 43 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..681624e 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: '闂磋窛' })}
>
@@ -300,7 +327,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