From 22e0ce8d19c0fad19c6c0250f9ea3e4d5296e542 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 13 三月 2024 15:48:36 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx | 16 ++++------------
zy-asrs-flow/src/pages/map/components/mapSettings.jsx | 15 ++++++++++++++-
zy-asrs-flow/src/services/route.js | 1 -
3 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx b/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
index c279d2e..20cf43f 100644
--- a/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
@@ -17,6 +17,7 @@
const [autoIncrement, setAutoIncrement] = useState(false);
useEffect(() => {
+ setAutoIncrement(false);
form.resetFields();
if (curSprite && props) {
form.setFieldsValue({
@@ -34,20 +35,12 @@
}
const handleFinish = (values) => {
- console.log({
- ...values
- , ...props.values
- , autoIncrement: autoIncrement
- }); return
props.submit({
...values
, ...props.values
, autoIncrement: autoIncrement
+ , type: curSprite?.data?.type
})
- }
-
- const formValuesChange = (value) => {
- console.log(value);
}
return (
@@ -73,7 +66,6 @@
>
<Form
form={form}
- onFieldsChange={formValuesChange}
initialValues={{
copyGap: 0,
autoIncrement: false,
@@ -191,11 +183,11 @@
options={[
{
label: intl.formatMessage({ id: 'map.settings.sub.copy.ascend', defaultMessage: '鍗囧簭' }),
- value: 'Ascending'
+ value: 'ascending'
},
{
label: intl.formatMessage({ id: 'map.settings.sub.copy.descend', defaultMessage: '闄嶅簭' }),
- value: 'Descending'
+ value: 'descending'
},
]}
onChange={(value) => {
diff --git a/zy-asrs-flow/src/pages/map/components/mapSettings.jsx b/zy-asrs-flow/src/pages/map/components/mapSettings.jsx
index d4013c3..0231b6f 100644
--- a/zy-asrs-flow/src/pages/map/components/mapSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/mapSettings.jsx
@@ -99,6 +99,19 @@
setLastCopiedSprites([]);
for (let i = 0; i < values.copyCount; i++) {
const copiedSprite = Utils.copySprite(curSprite);
+ // auto-increment-value
+ if (values.autoIncrement && values.type) {
+ switch (values.type) {
+ case Utils.SENSOR_TYPE.SHELF:
+ console.log(values);
+ break;
+ case Utils.SENSOR_TYPE.AGV:
+ break;
+ default:
+ break;
+ }
+ }
+ // graph copy
switch (values.copyDire) {
case 'left':
copiedSprite.position.x -= (i + 1) * (values.copyGap + copiedSprite.width);
@@ -339,7 +352,7 @@
</Form.Item>
<Form.Item>
<Button
- type="link"
+ type="link"
onClick={() => {
if (lastCopiedSprites) {
lastCopiedSprites.forEach(copiedSprite => {
diff --git a/zy-asrs-flow/src/services/route.js b/zy-asrs-flow/src/services/route.js
index 979bb36..0b5a631 100644
--- a/zy-asrs-flow/src/services/route.js
+++ b/zy-asrs-flow/src/services/route.js
@@ -26,7 +26,6 @@
export async function getRoutersInfo() {
return getRouters().then((res) => {
- console.log(res);
if (res.code === 200) {
// return res.data;
const routersInfo = convertCompatRouters(res.data);
--
Gitblit v1.9.1