|
@@ -206,7 +206,7 @@ export function useBasicDataTransform() { |
|
@@ -206,7 +206,7 @@ export function useBasicDataTransform() { |
206
|
return connections;
|
206
|
return connections;
|
207
|
}
|
207
|
}
|
208
|
|
208
|
|
209
|
- function getNodes(nodesRef: Ref<GraphNode[]> | GraphNode[], removeId: boolean) {
|
209
|
+ function getNodes(nodesRef: Ref<GraphNode[]> | GraphNode[]) {
|
210
|
const nodes: BasicNodeBindData[] = [];
|
210
|
const nodes: BasicNodeBindData[] = [];
|
211
|
|
211
|
|
212
|
let offsetX = 0;
|
212
|
let offsetX = 0;
|
|
@@ -217,10 +217,9 @@ export function useBasicDataTransform() { |
|
@@ -217,10 +217,9 @@ export function useBasicDataTransform() { |
217
|
if (ignoreNodeKeys.includes(nodeData.config?.key as string)) continue;
|
217
|
if (ignoreNodeKeys.includes(nodeData.config?.key as string)) continue;
|
218
|
|
218
|
|
219
|
const data = nodeData.data;
|
219
|
const data = nodeData.data;
|
220
|
-
|
|
|
221
|
const resultNode = Object.assign(
|
220
|
const resultNode = Object.assign(
|
222
|
mergeData(data, nodeData, node),
|
221
|
mergeData(data, nodeData, node),
|
223
|
- !nodeData.created || !removeId
|
222
|
+ nodeData.created
|
224
|
? ({
|
223
|
? ({
|
225
|
id: { id: node.id, entityType: RuleChainEntityType.RULE_NODE },
|
224
|
id: { id: node.id, entityType: RuleChainEntityType.RULE_NODE },
|
226
|
} as BasicNodeBindData)
|
225
|
} as BasicNodeBindData)
|
|
@@ -264,8 +263,7 @@ export function useBasicDataTransform() { |
|
@@ -264,8 +263,7 @@ export function useBasicDataTransform() { |
264
|
|
263
|
|
265
|
function combineData(
|
264
|
function combineData(
|
266
|
nodesRef: Ref<GraphNode[]> | GraphNode[] = [],
|
265
|
nodesRef: Ref<GraphNode[]> | GraphNode[] = [],
|
267
|
- edgesRef: Ref<GraphEdge[]> | GraphEdge[] = [],
|
|
|
268
|
- removeId = false
|
266
|
+ edgesRef: Ref<GraphEdge[]> | GraphEdge[] = []
|
269
|
) {
|
267
|
) {
|
270
|
const extraIgnoreNodeRef = unref(nodesRef).filter(
|
268
|
const extraIgnoreNodeRef = unref(nodesRef).filter(
|
271
|
(item) => !ignoreNodeKeys.includes((item.data as NodeData).config?.key as string)
|
269
|
(item) => !ignoreNodeKeys.includes((item.data as NodeData).config?.key as string)
|
|
@@ -273,7 +271,7 @@ export function useBasicDataTransform() { |
|
@@ -273,7 +271,7 @@ export function useBasicDataTransform() { |
273
|
|
271
|
|
274
|
const connections = getConnections(extraIgnoreNodeRef, edgesRef);
|
272
|
const connections = getConnections(extraIgnoreNodeRef, edgesRef);
|
275
|
|
273
|
|
276
|
- const nodes = getNodes(extraIgnoreNodeRef, removeId);
|
274
|
+ const nodes = getNodes(extraIgnoreNodeRef);
|
277
|
|
275
|
|
278
|
const firstNodeIndex = getFirsetNodeIndex(extraIgnoreNodeRef, edgesRef);
|
276
|
const firstNodeIndex = getFirsetNodeIndex(extraIgnoreNodeRef, edgesRef);
|
279
|
|
277
|
|