baotian
2024-06-04 b959135a1139fb66646523d92e5bd20c5910f283
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export default class FlowNode {
  constructor({ key, title, icon, type, group, endpointOptions, stepBody, parentNodes, nextNodes, position, enable, nextStep, direction }) {
    this.key = key
    this.title = title
    this.icon = icon
    this.type = type
    this.group = group
    this.endpointOptions = endpointOptions
    this.stepBody = stepBody
    this.parentNodes = parentNodes
    this.nextNodes = nextNodes
    this.position = position
    this.enable = enable
    this.nextStep = nextStep
    this.direction = direction
  }
}
export function createFlowNode(Data) {
  return new FlowNode({
    key: Data.key,
    title: Data.title,
    icon: Data.icon,
    type: Data.type,
    group: Data.group,
    endpointOptions: Data.endpointOptions,
    stepBody: Data.stepBody,
    parentNodes: Data.parentNodes,
    nextNodes: Data.nextNodes,
    position: Data.position,
    enable: Data.enable,
    nextStep: Data.nextStep,
    direction: Data.direction
  })
}
 
export function createFlowNodeDetail(key, title, icon, type, group, endpointOptions, stepBody, parentNodes, nextNodes, enable, nextStep) {
  return new FlowNode({
    key: key,
    title: title,
    icon: icon,
    type: type,
    group: group,
    endpointOptions: endpointOptions,
    stepBody: stepBody,
    parentNodes: parentNodes,
    nextNodes: nextNodes,
    position: [20, 20],
    enable: enable,
    nextStep: nextStep,
    direction: false
  })
}