From c5b679ca873428b5d94aa820cd327f2de80796c7 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 25 三月 2024 11:10:04 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/components/configSettings.jsx |  189 +++++++++++++++++++++++-----------------------
 1 files changed, 95 insertions(+), 94 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index 168af6e..306abd3 100644
--- a/zy-asrs-flow/src/pages/map/components/configSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
@@ -94,7 +94,8 @@
         // execute where the form was finished
         const confirmSettings = () => {
             if (curSprite && curSprite?.data?.type) {
-                curSprite.data = { ...curSprite.data, ...values }
+                curSprite.data = { ...curSprite.data, ...values };
+                Utils.showSheflType(curSprite);
             }
             message.success(intl.formatMessage({ id: 'common.success', defaultMessage: '鎿嶄綔鎴愬姛' }));
         }
@@ -149,41 +150,49 @@
                 {curSprite?.data?.type === Utils.SENSOR_TYPE.SHELF && (
                     <>
                         <Form.Item
-                            name='row'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.row', defaultMessage: '鎺�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
+                            label={intl.formatMessage({ id: 'map.settings.shelf.location', defaultMessage: '搴撲綅' })}
                         >
-                            <InputNumber
-                                style={{
-                                    width: '50%',
-                                }}
-                            />
-                        </Form.Item>
-                        <Form.Item
-                            name='bay'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.bay', defaultMessage: '鍒�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
-                        >
-                            <InputNumber
-                                style={{
-                                    width: '50%',
-                                }}
-                            />
+                            <Space.Compact>
+                                <Form.Item
+                                    name='row'
+                                    noStyle
+                                    rules={[
+                                        {
+                                            required: false,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.row' defaultMessage='鎺�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='bay'
+                                    noStyle
+                                    rules={[
+                                        {
+                                            required: false,
+                                        },
+                                    ]}
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bay' defaultMessage='鍒�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </Space.Compact>
                         </Form.Item>
                         <Form.Item
                             name='shelfType'
                             label={intl.formatMessage({ id: 'map.settings.shelf.type', defaultMessage: '绫诲瀷' })}
                             rules={[
                                 {
-                                    required: false,
+                                    required: true,
                                 },
                             ]}
                         >
@@ -191,88 +200,80 @@
                                 style={{ width: 120 }}
                                 options={[
                                     {
-                                        label: '搴撲綅',
-                                        value: 'loc'
+                                        label: intl.formatMessage({ id: 'map.settings.shelf.store', defaultMessage: '搴撲綅' }),
+                                        value: Utils.SHELF_TYPE.STORE
                                     },
                                     {
-                                        label: '杞ㄩ亾',
-                                        value: 'track'
+                                        label: intl.formatMessage({ id: 'map.settings.shelf.track', defaultMessage: '杞ㄩ亾' }),
+                                        value: Utils.SHELF_TYPE.TRACK
                                     },
                                     {
-                                        label: '绂佺敤',
-                                        value: 'disable'
+                                        label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
+                                        value: Utils.SHELF_TYPE.DISABLE
                                     },
                                 ]}
+                                defaultValue={0}
                             />
                         </Form.Item>
                         <Form.Item
-                            name='top'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.top', defaultMessage: '涓�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
+                            label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
                         >
-                            <InputNumber
-                                style={{
-                                    width: '50%',
-                                }}
-                            />
+                            <Space.Compact>
+                                <Form.Item
+                                    name='top'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.top' defaultMessage='涓�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='bottom'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bottom' defaultMessage='涓�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </Space.Compact>
                         </Form.Item>
                         <Form.Item
-                            name='right'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.right', defaultMessage: '鍙�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
+                            label={' '}
                         >
-                            <InputNumber
-                                style={{
-                                    width: '50%',
-                                }}
-                            />
-                        </Form.Item>
-                        <Form.Item
-                            name='bottom'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.bottom', defaultMessage: '涓�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
-                        >
-                            <InputNumber
-                                style={{
-                                    width: '50%',
-                                }}
-                            />
-                        </Form.Item>
-                        <Form.Item
-                            name='left'
-                            label={intl.formatMessage({ id: 'map.settings.shelf.left', defaultMessage: '宸�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
-                        >
-                            <InputNumber
-                                style={{
-                                    width: '50%',
-                                }}
-                            />
+                            <Space.Compact>
+                                <Form.Item
+                                    name='left'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.left' defaultMessage='宸�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                                <Form.Item
+                                    name='right'
+                                    noStyle
+                                >
+                                    <InputNumber
+                                        addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.right' defaultMessage='鍙�' /></Space.Compact>}
+                                        style={{
+                                            width: '50%',
+                                        }}
+                                    />
+                                </Form.Item>
+                            </Space.Compact>
                         </Form.Item>
                         <Form.Item
                             name='value'
                             label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '鍦板浘鍊�' })}
-                            rules={[
-                                {
-                                    required: false,
-                                },
-                            ]}
                         >
                             <Input
                                 style={{

--
Gitblit v1.9.1