From 88568c814761ac924e233f50de8ce5795d1b1f5b Mon Sep 17 00:00:00 2001 From: panxinying Date: Fri, 4 Sep 2026 14:16:32 +0800 Subject: [PATCH] feat: variable aggregation node --- .../icons/variable-aggregation-node-icon.vue | 6 + .../component/GroupFieldDialog.vue | 77 +++++ .../nodes/variable-aggregation-node/index.ts | 19 ++ .../nodes/variable-aggregation-node/index.vue | 322 ++++++++++++++++++ 4 files changed, 424 insertions(+) create mode 100644 ui/src/workflow-canvas/icons/variable-aggregation-node-icon.vue create mode 100644 ui/src/workflow-canvas/nodes/variable-aggregation-node/component/GroupFieldDialog.vue create mode 100644 ui/src/workflow-canvas/nodes/variable-aggregation-node/index.ts create mode 100644 ui/src/workflow-canvas/nodes/variable-aggregation-node/index.vue diff --git a/ui/src/workflow-canvas/icons/variable-aggregation-node-icon.vue b/ui/src/workflow-canvas/icons/variable-aggregation-node-icon.vue new file mode 100644 index 00000000000..7ea4a139f8c --- /dev/null +++ b/ui/src/workflow-canvas/icons/variable-aggregation-node-icon.vue @@ -0,0 +1,6 @@ + + diff --git a/ui/src/workflow-canvas/nodes/variable-aggregation-node/component/GroupFieldDialog.vue b/ui/src/workflow-canvas/nodes/variable-aggregation-node/component/GroupFieldDialog.vue new file mode 100644 index 00000000000..10ae75633be --- /dev/null +++ b/ui/src/workflow-canvas/nodes/variable-aggregation-node/component/GroupFieldDialog.vue @@ -0,0 +1,77 @@ + + + diff --git a/ui/src/workflow-canvas/nodes/variable-aggregation-node/index.ts b/ui/src/workflow-canvas/nodes/variable-aggregation-node/index.ts new file mode 100644 index 00000000000..42bc4ae86df --- /dev/null +++ b/ui/src/workflow-canvas/nodes/variable-aggregation-node/index.ts @@ -0,0 +1,19 @@ +import VariableAggregationNodeVue from './index.vue' +import { WorkflowNodeModel, WorkflowNodeView } from '@/workflow-canvas/core/workflow-node' +import { WorkflowNodeType } from '@/workflow-canvas/types' + +class VariableAggregationNodeView extends WorkflowNodeView { + constructor(props: ConstructorParameters[0]) { + super(props, VariableAggregationNodeVue) + } +} + +class VariableAggregationNodeModel extends WorkflowNodeModel { + setAttributes() { + this.width = Number(this.properties.width ?? 450) + this.height = Number(this.properties.height ?? 300) + this.text.editable = false + } +} + +export default { type: WorkflowNodeType.VariableAggregationNode, model: VariableAggregationNodeModel, view: VariableAggregationNodeView } diff --git a/ui/src/workflow-canvas/nodes/variable-aggregation-node/index.vue b/ui/src/workflow-canvas/nodes/variable-aggregation-node/index.vue new file mode 100644 index 00000000000..8170b66dc15 --- /dev/null +++ b/ui/src/workflow-canvas/nodes/variable-aggregation-node/index.vue @@ -0,0 +1,322 @@ + + +