From 4a0e60026c667439335a76c0398ff448352a77ca Mon Sep 17 00:00:00 2001 From: ZLY Date: Thu, 30 Oct 2025 10:16:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor(utils):=20=E6=9B=B4=E6=96=B0=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E8=8A=82=E7=82=B9=E5=90=8D=E7=A7=B0=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/convertAppFlowData.ts | 10 ++++++---- src/utils/convertFlowData.ts | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/utils/convertAppFlowData.ts b/src/utils/convertAppFlowData.ts index 7fc6e0d..f6aeef3 100644 --- a/src/utils/convertAppFlowData.ts +++ b/src/utils/convertAppFlowData.ts @@ -33,21 +33,23 @@ export const convertAppFlowData = (appFlowData: any[]) => { parameters: { // eventListenes 作为 apiIns(输入) apiIns: app.eventListenes ? app.eventListenes.map((event: any) => ({ - name: event.eventName, + name: event.nodeName, desc: event.description || '', dataType: '', defaultValue: '', topic: event.topic, - eventId: event.eventId + eventId: event.eventId, + eventName: event.eventName })) : [], // eventSends 作为 apiOuts(输出) apiOuts: app.eventSends ? app.eventSends.map((event: any) => ({ - name: event.eventName, + name: event.nodeName, desc: event.description || '', dataType: '', defaultValue: '', topic: event.topic, - eventId: event.eventId + eventId: event.eventId, + eventName: event.eventName })) : [], // 提取 dataIns 和 dataOuts 属性 dataIns: [], diff --git a/src/utils/convertFlowData.ts b/src/utils/convertFlowData.ts index c49dff8..c9a4154 100644 --- a/src/utils/convertFlowData.ts +++ b/src/utils/convertFlowData.ts @@ -492,7 +492,6 @@ export const reverseConvertFlowData = (nodes: any[], edges: any[], complexKV: an position: node.position || { x: 0, y: 0 } }; - console.log('node:', node); // 处理 component 信息 if (node.type === 'SUB' && !node.customDef) { nodeConfig.component = {