pref(app-flow): 支持应用节点位置自定义及事件ID传递

master
钟良源 3 months ago
parent d9b97c2fd6
commit 9f83b09ed6

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

Loading…
Cancel
Save