From 0d04bc5d8080b82338302fba0a59fccff2eaedfc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 06 七月 2025 11:28:29 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/configSettings.jsx | 128 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 127 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index 206a29f..32e5015 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,9 @@
const { styles } = useStyles();
const { curSprite, configForm: form } = props;
+ const [showLiftNoItem, setShowLiftNoItem] = React.useState(false);
+ const [showConveyorNoItem, setShowConveyorNoItem] = React.useState(false);
+
useEffect(() => {
form.resetFields();
if (curSprite) {
@@ -21,6 +23,8 @@
shelfType: Utils.SHELF_TYPE.STORE,
...curSprite.data
})
+ setShowLiftNoItem(form.getFieldValue('shelfType') === Utils.SHELF_TYPE.LIFT);
+ setShowConveyorNoItem(form.getFieldValue('shelfType') === Utils.SHELF_TYPE.CONVEYOR);
}
}, [props, form]);
@@ -77,6 +81,11 @@
no: ''
});
}
+ break;
+ case 'shelfType':
+ const shelfType = form.getFieldValue('shelfType');
+ setShowLiftNoItem(shelfType === Utils.SHELF_TYPE.LIFT);
+ setShowConveyorNoItem(shelfType === Utils.SHELF_TYPE.CONVEYOR);
break;
default:
break;
@@ -148,6 +157,12 @@
</>
)}
+ {curSprite?.data?.type === Utils.SENSOR_TYPE.SHUTTLE && (
+ <>
+
+ </>
+ )}
+
{curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
<>
<Form.Item
@@ -209,12 +224,65 @@
value: Utils.SHELF_TYPE.TRACK
},
{
+ label: intl.formatMessage({ id: 'map.settings.shelf.lift', defaultMessage: '鎻愬崌鏈�' }),
+ value: Utils.SHELF_TYPE.LIFT
+ },
+ {
+ label: intl.formatMessage({ id: 'map.settings.shelf.charge', defaultMessage: '鍏呯數绔�' }),
+ value: Utils.SHELF_TYPE.CHARGE
+ },
+ {
+ label: intl.formatMessage({ id: 'map.settings.shelf.conveyor', defaultMessage: '杈撻�佺嚎' }),
+ value: Utils.SHELF_TYPE.CONVEYOR
+ },
+ {
label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
value: Utils.SHELF_TYPE.DISABLE
},
]}
/>
</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>
+ </>
+ )}
+
+ {showConveyorNoItem && (
+ <>
+ <Form.Item
+ name='conveyorNo'
+ label={intl.formatMessage({ id: 'map.settings.conveyor.no', defaultMessage: '杈撻�佺珯鍙�' })}
+ rules={[
+ {
+ required: true,
+ },
+ ]}
+ >
+ <InputNumber
+ style={{
+ width: '50%',
+ }}
+ />
+ </Form.Item>
+ </>
+ )}
+
<Form.Item
label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
>
@@ -272,6 +340,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: '鍦板浘鍊�' })}
>
@@ -284,6 +390,26 @@
</>
)}
+ {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>
+ </>
+ )}
+
{curSprite?.data?.type === Utils.SENSOR_TYPE.POINT && (
<>
<Form.Item
--
Gitblit v1.9.1