diff --git a/src/hooks/useFlowCallbacks.ts b/src/hooks/useFlowCallbacks.ts index c278bbe..737beae 100644 --- a/src/hooks/useFlowCallbacks.ts +++ b/src/hooks/useFlowCallbacks.ts @@ -1224,7 +1224,8 @@ export const useFlowCallbacks = ( } else { const appFlowParams = { - appEventList: {} + appEventList: {}, + eventEdges: [] }; nodes.forEach(node => { @@ -1236,6 +1237,21 @@ export const useFlowCallbacks = ( const eventMap = new Map(); edges.forEach((edge: any) => { + console.log('edge:', edge); + + // 处理事件连线 + appFlowParams.eventEdges.push({ + id: edge.id, + source: edge.source, + target: edge.target, + lineType: 'data', + data: { + displayData: { + ...edge.data.displayData + } + } + }); + // 应用组件的桩点id就是事件id const sourceId = edge.sourceHandle; const targetId = edge.targetHandle; @@ -1260,7 +1276,7 @@ export const useFlowCallbacks = ( eventId: Array.from(new Set(item.eventId)) })); try { - updateAppFlowData(appEventParams); + updateAppFlowData(appFlowParams); if (appEventParams.length > 0) { for (const item of appEventParams) { await sleep(500);