fix(flow): 修复应用事件参数更新逻辑

master
钟良源 1 month ago
parent 6e63524905
commit 86f433b873

@ -1249,6 +1249,7 @@ export const useFlowCallbacks = (
}; };
nodes.forEach(node => { nodes.forEach(node => {
appFlowParams.appEventList[node.id] = { appFlowParams.appEventList[node.id] = {
x: node.position.x, x: node.position.x,
y: node.position.y y: node.position.y
@ -1274,7 +1275,7 @@ export const useFlowCallbacks = (
// 应用组件的桩点id就是事件id // 应用组件的桩点id就是事件id
const sourceId = edge.sourceHandle; const sourceId = edge.sourceHandle;
const targetId = edge.targetHandle; const targetId = edge.targetHandle;
const topic = edge.data.displayData.topic; const topic = edge.data.displayData?.topic;
if (eventMap.has(topic)) { if (eventMap.has(topic)) {
// 如果topic已存在将eventId添加到数组中 // 如果topic已存在将eventId添加到数组中
@ -1298,10 +1299,12 @@ export const useFlowCallbacks = (
updateAppFlowData(appFlowParams); updateAppFlowData(appFlowParams);
if (appEventParams.length > 0) { if (appEventParams.length > 0) {
for (const item of appEventParams) { for (const item of appEventParams) {
if (item.topic) {
await sleep(500); await sleep(500);
await updateAppEventChannel(item); await updateAppEventChannel(item);
} }
} }
}
Message.success('保存成功'); Message.success('保存成功');
} catch (error) { } catch (error) {

Loading…
Cancel
Save