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 |   65 +++++++++++++++++++++++++++++++-
 1 files changed, 63 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 14417e9..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,12 +13,16 @@
     const { styles } = useStyles();
     const { curSprite, configForm: form } = props;
 
+    const [showLiftNoItem, setShowLiftNoItem] = React.useState(false);
+
     useEffect(() => {
         form.resetFields();
         if (curSprite) {
             form.setFieldsValue({
+                shelfType: Utils.SHELF_TYPE.STORE,
                 ...curSprite.data
             })
+            setShowLiftNoItem(form.getFieldValue('shelfType') === Utils.SHELF_TYPE.LIFT);
         }
     }, [props, form]);
 
@@ -76,6 +79,10 @@
                                     no: ''
                                 });
                             }
+                            break;
+                        case 'shelfType':
+                            const shelfType = form.getFieldValue('shelfType');
+                            setShowLiftNoItem(shelfType === Utils.SHELF_TYPE.LIFT);
                             break;
                         default:
                             break;
@@ -147,6 +154,12 @@
                     </>
                 )}
 
+                {curSprite?.data?.type === Utils.SENSOR_TYPE.SHUTTLE && (
+                    <>
+
+                    </>
+                )}
+
                 {curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
                     <>
                         <Form.Item
@@ -208,13 +221,41 @@
                                         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.diable', defaultMessage: '绂佺敤' }),
                                         value: Utils.SHELF_TYPE.DISABLE
                                     },
                                 ]}
-                                defaultValue={0}
                             />
                         </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: '闂磋窛' })}
                         >
@@ -284,6 +325,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