|
|
|
|
@ -129,7 +129,6 @@ export const convertFlowData = (flowData: any, useDefault = true) => {
|
|
|
|
|
} else {
|
|
|
|
|
nodeType = nodeConfig.component?.type || 'BASIC';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 解析位置信息
|
|
|
|
|
const position = nodeConfig.position || { x: 0, y: 0 };
|
|
|
|
|
|
|
|
|
|
@ -143,7 +142,7 @@ export const convertFlowData = (flowData: any, useDefault = true) => {
|
|
|
|
|
parameters: {
|
|
|
|
|
apiIns: getNodeApiIns(nodeId, nodeConfig, currentProjectCompData),
|
|
|
|
|
apiOuts: getNodeApiOuts(nodeId, nodeConfig, currentProjectCompData),
|
|
|
|
|
dataIns: nodeConfig.dataIns || [],
|
|
|
|
|
dataIns: getNodeDataIns(nodeConfig),
|
|
|
|
|
dataOuts: nodeConfig.dataOuts || [],
|
|
|
|
|
},
|
|
|
|
|
type: nodeConfig.component?.type || nodeType,
|
|
|
|
|
@ -725,6 +724,27 @@ export const reverseConvertFlowData = (
|
|
|
|
|
return flowData;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取节点的数据输入参数
|
|
|
|
|
const getNodeDataIns = (nodeConfig: any) => {
|
|
|
|
|
if (Array.isArray(nodeConfig.dataIns) && nodeConfig.dataIns.length > 0) {
|
|
|
|
|
return nodeConfig.dataIns;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (nodeConfig.component?.type === 'EVENTSEND_SYNC') {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
arrayType: null,
|
|
|
|
|
dataType: 'STRING',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
desc: '输入',
|
|
|
|
|
id: 'in',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return [];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取节点的API输入参数
|
|
|
|
|
const getNodeApiIns = (
|
|
|
|
|
nodeId: string,
|
|
|
|
|
|