diff --git a/src/utils/convertAppFlowData.ts b/src/utils/convertAppFlowData.ts index 22ad08a..9313f2a 100644 --- a/src/utils/convertAppFlowData.ts +++ b/src/utils/convertAppFlowData.ts @@ -27,7 +27,7 @@ export const convertAppFlowData = (appFlowData: any[]) => { const node: any = { id: app.appId || `app_${index}`, type: 'APP', - position: { x: 200 + index * 300, y: 200 }, + position: app.position || { x: 200 + index * 300, y: 200 }, data: { title: app.name || `应用${index + 1}`, parameters: { @@ -37,7 +37,8 @@ export const convertAppFlowData = (appFlowData: any[]) => { desc: event.description || '', dataType: '', defaultValue: '', - topic: event.topic + topic: event.topic, + eventId: event.eventId })) : [], // eventSends 作为 apiOuts(输出) apiOuts: app.eventSends ? app.eventSends.map((event: any) => ({ @@ -45,7 +46,8 @@ export const convertAppFlowData = (appFlowData: any[]) => { desc: event.description || '', dataType: '', defaultValue: '', - topic: event.topic + topic: event.topic, + eventId: event.eventId })) : [], // 提取 dataIns 和 dataOuts 属性 dataIns: [],