refactor(utils): 更新事件节点名称映射逻辑

master
钟良源 3 months ago
parent 3ae2a46afb
commit 4a0e60026c

@ -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: [],

@ -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 = {

Loading…
Cancel
Save