From 19e24b4f23cf19fb2edf776abffa5b7e754c22d5 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 21 三月 2024 14:41:10 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/components/configSettings.jsx |   77 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index f1e5220..e158718 100644
--- a/zy-asrs-flow/src/pages/map/components/configSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
@@ -18,11 +18,14 @@
         form.resetFields();
         if (curSprite) {
             form.setFieldsValue({
-
-                // shelf
-                row: curSprite?.data?.row,
-                bay: curSprite?.data?.bay,
-                no: curSprite?.data?.no,
+                ...curSprite.data
+                // no: curSprite.data?.no,
+                // // shelf
+                // row: curSprite.data?.row,
+                // bay: curSprite.data?.bay,
+                // // point
+                // vertical: curSprite.data?.vertical,
+                // horizontal: curSprite.data?.horizontal,
             })
         }
     }, [props, form]);
@@ -57,6 +60,30 @@
                                 });
                             }
                             break;
+                        case 'vertical':
+                            const horizontal = form.getFieldValue('horizontal')
+                            if (value && horizontal) {
+                                form.setFieldsValue({
+                                    no: Utils.pureNumStr(value) + '-' + Utils.pureNumStr(horizontal)
+                                });
+                            } else {
+                                form.setFieldsValue({
+                                    no: ''
+                                });
+                            }
+                            break;
+                        case 'horizontal':
+                            const vertical = form.getFieldValue('vertical')
+                            if (value && vertical) {
+                                form.setFieldsValue({
+                                    no: Utils.pureNumStr(vertical) + '-' + Utils.pureNumStr(value)
+                                });
+                            } else {
+                                form.setFieldsValue({
+                                    no: ''
+                                });
+                            }
+                            break;
                         default:
                             break;
                     }
@@ -79,6 +106,11 @@
                         curSprite.data.no = values.no; // *
                         curSprite.data.row = values.row;
                         curSprite.data.bay = values.bay;
+                        break;
+                    case Utils.SENSOR_TYPE.POINT:
+                        curSprite.data.no = values.no; // *
+                        curSprite.data.horizontal = values.horizontal;
+                        curSprite.data.vertical = values.vertical;
                         break;
                     case Utils.SENSOR_TYPE.AGV:
                         curSprite.data.no = values.no; // *
@@ -172,6 +204,41 @@
                     </>
                 )}
 
+                {curSprite?.data?.type === Utils.SENSOR_TYPE.POINT && (
+                    <>
+                        <Form.Item
+                            name='vertical'
+                            label={intl.formatMessage({ id: 'map.settings.point.vertical', defaultMessage: '绾靛悜' })}
+                            rules={[
+                                {
+                                    required: false,
+                                },
+                            ]}
+                        >
+                            <InputNumber
+                                style={{
+                                    width: '50%',
+                                }}
+                            />
+                        </Form.Item>
+                        <Form.Item
+                            name='horizontal'
+                            label={intl.formatMessage({ id: 'map.settings.point.horizontal', defaultMessage: '妯悜' })}
+                            rules={[
+                                {
+                                    required: false,
+                                },
+                            ]}
+                        >
+                            <InputNumber
+                                style={{
+                                    width: '50%',
+                                }}
+                            />
+                        </Form.Item>
+                    </>
+                )}
+
                 <Form.Item
                     name='no'
                     label={intl.formatMessage({ id: 'map.settings.no', defaultMessage: '缂栧彿' })}

--
Gitblit v1.9.1