From fe8973600abf1e6bd78a6a4bd9af5a9ea7f5b022 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Fri, 4 Sep 2026 16:36:44 +0800 Subject: [PATCH] feat: Basic nodes of tool workflow --- .../component/input/InputFieldFormDialog.vue | 137 ++++++++++++++++++ .../component/input/InputFieldTable.vue | 137 ++++++++++++++++++ .../component/input/InputTitleDialog.vue | 81 +++++++++++ .../output/OutputFieldFormDialog.vue | 111 ++++++++++++++ .../component/output/OutputFieldTable.vue | 110 ++++++++++++++ .../component/output/OutputTitleDialog.vue | 81 +++++++++++ .../nodes/tool-base-node/index.ts | 18 +++ .../nodes/tool-base-node/index.vue | 33 +++++ 8 files changed, 708 insertions(+) create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldFormDialog.vue create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldTable.vue create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputTitleDialog.vue create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldFormDialog.vue create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldTable.vue create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputTitleDialog.vue create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/index.ts create mode 100644 ui/src/workflow-canvas/nodes/tool-base-node/index.vue diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldFormDialog.vue b/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldFormDialog.vue new file mode 100644 index 00000000000..7e69076e046 --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldFormDialog.vue @@ -0,0 +1,137 @@ + + + \ No newline at end of file diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldTable.vue b/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldTable.vue new file mode 100644 index 00000000000..c141606bac0 --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputFieldTable.vue @@ -0,0 +1,137 @@ + + + \ No newline at end of file diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputTitleDialog.vue b/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputTitleDialog.vue new file mode 100644 index 00000000000..054c4f945fa --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/component/input/InputTitleDialog.vue @@ -0,0 +1,81 @@ + + + \ No newline at end of file diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldFormDialog.vue b/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldFormDialog.vue new file mode 100644 index 00000000000..ae72f4e6986 --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldFormDialog.vue @@ -0,0 +1,111 @@ + + + \ No newline at end of file diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldTable.vue b/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldTable.vue new file mode 100644 index 00000000000..5366aecfecf --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputFieldTable.vue @@ -0,0 +1,110 @@ + + + \ No newline at end of file diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputTitleDialog.vue b/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputTitleDialog.vue new file mode 100644 index 00000000000..2f516d281f8 --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/component/output/OutputTitleDialog.vue @@ -0,0 +1,81 @@ + + + \ No newline at end of file diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/index.ts b/ui/src/workflow-canvas/nodes/tool-base-node/index.ts new file mode 100644 index 00000000000..2f977e624de --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/index.ts @@ -0,0 +1,18 @@ +import ToolBaseNode from './index.vue' +import { WorkflowNodeModel, WorkflowNodeView } from '@/workflow-canvas/core/workflow-node' +import { WorkflowNodeType } from '@/workflow-canvas/types.ts' + +class ToolBaseNodeView extends WorkflowNodeView { + constructor(props: ConstructorParameters[0]) { + super(props, ToolBaseNode) + } +} + +class ToolBaseNodeModel extends WorkflowNodeModel { + setAttributes() { + super.setAttributes() + this.width = 600 + } +} + +export default { type: WorkflowNodeType.ToolBaseNode, model: ToolBaseNodeModel, view: ToolBaseNodeView } \ No newline at end of file diff --git a/ui/src/workflow-canvas/nodes/tool-base-node/index.vue b/ui/src/workflow-canvas/nodes/tool-base-node/index.vue new file mode 100644 index 00000000000..02e7d62b9f1 --- /dev/null +++ b/ui/src/workflow-canvas/nodes/tool-base-node/index.vue @@ -0,0 +1,33 @@ + + + \ No newline at end of file