|
@@ -24,8 +24,73 @@ const workflow = ref<IWorkflow>({
|
|
|
// conditionNode,
|
|
// conditionNode,
|
|
|
// databaseNode,
|
|
// databaseNode,
|
|
|
// codeNode
|
|
// codeNode
|
|
|
- ],
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'node-1',
|
|
|
|
|
+ type: 'canvas-node',
|
|
|
|
|
+ position: { x: 100, y: 100 },
|
|
|
|
|
+ width: 96,
|
|
|
|
|
+ height: 96,
|
|
|
|
|
+ data: {
|
|
|
|
|
+ version: ['1.0.0'],
|
|
|
|
|
+ displayName: '用户输入',
|
|
|
|
|
+ name: 'chart',
|
|
|
|
|
+ description: '通过用户输入开启流程处理',
|
|
|
|
|
+ icon: 'fluent:comment-multiple-28-regular',
|
|
|
|
|
+ iconColor: '#296dff',
|
|
|
|
|
+ inputs: [],
|
|
|
|
|
+ outputs: [
|
|
|
|
|
+ {
|
|
|
|
|
+ index: 0,
|
|
|
|
|
+ type: 'main'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'node-2',
|
|
|
|
|
+ type: 'canvas-node',
|
|
|
|
|
+ width: 96,
|
|
|
|
|
+ height: 96,
|
|
|
|
|
+ position: { x: 400, y: 100 },
|
|
|
|
|
+ data: {
|
|
|
|
|
+ version: ['1.0.0'],
|
|
|
|
|
+ displayName: '条件判断',
|
|
|
|
|
+ name: 'if',
|
|
|
|
|
+ description: '通过条件判断拆分多个流程分支',
|
|
|
|
|
+ icon: 'roentgen:guidepost',
|
|
|
|
|
+ iconColor: '#108e49',
|
|
|
|
|
+ inputs: [
|
|
|
|
|
+ {
|
|
|
|
|
+ index: 0,
|
|
|
|
|
+ type: 'main'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ outputs: [
|
|
|
|
|
+ {
|
|
|
|
|
+ index: 0,
|
|
|
|
|
+ type: 'main',
|
|
|
|
|
+ label: 'true'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ index: 1,
|
|
|
|
|
+ type: 'main',
|
|
|
|
|
+ label: 'false'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ outputNames: ['true', 'false']
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
edges: [
|
|
edges: [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'edge-1-2',
|
|
|
|
|
+ source: 'node-1',
|
|
|
|
|
+ target: 'node-2',
|
|
|
|
|
+ type: 'canvas-edge',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ label: 'Edge 1-2'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// {
|
|
// {
|
|
|
// id: 'edge-1-2',
|
|
// id: 'edge-1-2',
|
|
|
// source: 'start-node',
|
|
// source: 'start-node',
|