From 4fa64835a5d14e3a80e7f4960b800fa50934e2cf Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 14 三月 2024 15:30:26 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx b/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
index f134d3e..64767ad 100644
--- a/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
@@ -15,6 +15,7 @@
const { curSprite } = props;
const [form] = Form.useForm();
const [autoIncrement, setAutoIncrement] = useState(false);
+ const [autoIncrementError, setAutoIncrementError] = useState(null);
useEffect(() => {
setAutoIncrement(false);
@@ -30,15 +31,17 @@
if (autoIncrement === true && curSprite) {
switch (curSprite.data?.type) {
case Utils.SENSOR_TYPE.SHELF:
- console.log(1);
if (!curSprite.data?.row || !curSprite.data?.bay) {
- message.warning(intl.formatMessage({ id: 'map.settings.sub.copy.warn.config.shelf', defaultMessage: '璇峰厛璁剧疆璐ф灦鍙傛暟!' }))
+ setAutoIncrementError(intl.formatMessage({ id: 'map.settings.sub.copy.warn.config.shelf', defaultMessage: '璇峰厛璁剧疆璐ф灦鍙傛暟锛�' }));
+ } else {
+ setAutoIncrementError(null);
}
break;
default:
break;
}
-
+ } else {
+ setAutoIncrementError(null);
}
}, [autoIncrement])
@@ -139,6 +142,8 @@
<Form.Item
label={intl.formatMessage({ id: 'map.settings.sub.copy.shelf.auto-increment', defaultMessage: '鑷闀�' })}
labelCol={{ span: 8 }}
+ help={autoIncrementError}
+ validateStatus={autoIncrementError ? "error" : null}
>
<Switch value={autoIncrement} onChange={setAutoIncrement} />
</Form.Item>
--
Gitblit v1.9.1