From c986713d84c52c93aa68e6b4f28f24bfa35cc38d Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Thu, 6 Jun 2024 16:36:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A5=E4=BD=9C=E7=BC=96=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/workflow/index.vue | 237 ------------- ui/src/views/application-workflow/index.vue | 7 +- ui/src/workflow/common/NodeCascader.vue | 10 + .../common/NodeContainer.vue} | 2 +- .../workflow/common/NodeControl.vue | 0 .../index.ts => workflow/common/app-node.ts} | 2 +- .../menu-data.ts => workflow/common/data.ts} | 64 +++- .../edge/index.ts => workflow/common/edge.ts} | 0 .../workflow/icons/ai-chat-node-icon.vue | 0 .../workflow/icons/base-node-icon.vue | 0 .../workflow/icons/condition-node-icon.vue | 0 .../icons/search-dataset-node-icon.vue | 0 .../workflow/icons/start-node-icon.vue | 0 ui/src/workflow/icons/utils.ts | 5 + ui/src/workflow/index.vue | 322 ++++++++++++++++++ .../workflow/nodes/ai-chat-node/index.ts | 2 +- .../workflow/nodes/ai-chat-node/index.vue | 8 +- .../workflow/nodes/base-node/index.ts | 2 +- .../workflow/nodes/base-node/index.vue | 8 +- .../workflow/nodes/condition-node/index.ts | 2 +- .../workflow/nodes/condition-node/index.vue | 16 +- .../nodes/search-dataset-node/index.ts | 2 +- .../nodes/search-dataset-node/index.vue | 2 +- .../workflow/nodes/start-node/index.ts | 2 +- .../workflow/nodes/start-node/index.vue | 4 +- 25 files changed, 420 insertions(+), 277 deletions(-) delete mode 100644 ui/src/components/workflow/index.vue create mode 100644 ui/src/workflow/common/NodeCascader.vue rename ui/src/{components/workflow/common/node-container/index.vue => workflow/common/NodeContainer.vue} (98%) rename ui/src/{components => }/workflow/common/NodeControl.vue (100%) rename ui/src/{components/workflow/common/app-node/index.ts => workflow/common/app-node.ts} (99%) rename ui/src/{components/workflow/menu-data.ts => workflow/common/data.ts} (53%) rename ui/src/{components/workflow/common/edge/index.ts => workflow/common/edge.ts} (100%) rename ui/src/{components => }/workflow/icons/ai-chat-node-icon.vue (100%) rename ui/src/{components => }/workflow/icons/base-node-icon.vue (100%) rename ui/src/{components => }/workflow/icons/condition-node-icon.vue (100%) rename ui/src/{components => }/workflow/icons/search-dataset-node-icon.vue (100%) rename ui/src/{components => }/workflow/icons/start-node-icon.vue (100%) create mode 100644 ui/src/workflow/icons/utils.ts create mode 100644 ui/src/workflow/index.vue rename ui/src/{components => }/workflow/nodes/ai-chat-node/index.ts (72%) rename ui/src/{components => }/workflow/nodes/ai-chat-node/index.vue (89%) rename ui/src/{components => }/workflow/nodes/base-node/index.ts (71%) rename ui/src/{components => }/workflow/nodes/base-node/index.vue (91%) rename ui/src/{components => }/workflow/nodes/condition-node/index.ts (73%) rename ui/src/{components => }/workflow/nodes/condition-node/index.vue (93%) rename ui/src/{components => }/workflow/nodes/search-dataset-node/index.ts (75%) rename ui/src/{components => }/workflow/nodes/search-dataset-node/index.vue (98%) rename ui/src/{components => }/workflow/nodes/start-node/index.ts (72%) rename ui/src/{components => }/workflow/nodes/start-node/index.vue (87%) diff --git a/ui/src/components/workflow/index.vue b/ui/src/components/workflow/index.vue deleted file mode 100644 index 75222edbb..000000000 --- a/ui/src/components/workflow/index.vue +++ /dev/null @@ -1,237 +0,0 @@ - - - diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue index f23839256..8233a0964 100644 --- a/ui/src/views/application-workflow/index.vue +++ b/ui/src/views/application-workflow/index.vue @@ -19,7 +19,7 @@
基础组件
- + diff --git a/ui/src/components/workflow/nodes/ai-chat-node/index.ts b/ui/src/workflow/nodes/ai-chat-node/index.ts similarity index 72% rename from ui/src/components/workflow/nodes/ai-chat-node/index.ts rename to ui/src/workflow/nodes/ai-chat-node/index.ts index 91a1aba55..648b515e4 100644 --- a/ui/src/components/workflow/nodes/ai-chat-node/index.ts +++ b/ui/src/workflow/nodes/ai-chat-node/index.ts @@ -1,5 +1,5 @@ import ChatNodeVue from './index.vue' -import { AppNode, AppNodeModel } from '@/components/workflow/common/app-node/index' +import { AppNode, AppNodeModel } from '@/workflow/common/app-node.ts' class ChatNode extends AppNode { constructor(props: any) { super(props, ChatNodeVue) diff --git a/ui/src/components/workflow/nodes/ai-chat-node/index.vue b/ui/src/workflow/nodes/ai-chat-node/index.vue similarity index 89% rename from ui/src/components/workflow/nodes/ai-chat-node/index.vue rename to ui/src/workflow/nodes/ai-chat-node/index.vue index b0b7fe024..324ce55e2 100644 --- a/ui/src/components/workflow/nodes/ai-chat-node/index.vue +++ b/ui/src/workflow/nodes/ai-chat-node/index.vue @@ -34,7 +34,7 @@ }" prop="name" > - + @@ -42,7 +42,7 @@ diff --git a/ui/src/components/workflow/nodes/condition-node/index.ts b/ui/src/workflow/nodes/condition-node/index.ts similarity index 73% rename from ui/src/components/workflow/nodes/condition-node/index.ts rename to ui/src/workflow/nodes/condition-node/index.ts index 8f84672c3..db542d5a1 100644 --- a/ui/src/components/workflow/nodes/condition-node/index.ts +++ b/ui/src/workflow/nodes/condition-node/index.ts @@ -1,5 +1,5 @@ import ConditioNodeVue from './index.vue' -import { AppNode, AppNodeModel } from '@/components/workflow/common/app-node/index' +import { AppNode, AppNodeModel } from '@/workflow/common/app-node.ts' class ConditioNode extends AppNode { constructor(props: any) { super(props, ConditioNodeVue) diff --git a/ui/src/components/workflow/nodes/condition-node/index.vue b/ui/src/workflow/nodes/condition-node/index.vue similarity index 93% rename from ui/src/components/workflow/nodes/condition-node/index.vue rename to ui/src/workflow/nodes/condition-node/index.vue index aef74ae55..12c0c18d4 100644 --- a/ui/src/components/workflow/nodes/condition-node/index.vue +++ b/ui/src/workflow/nodes/condition-node/index.vue @@ -6,6 +6,10 @@ require-asterisk-position="right" label-width="auto" ref="ConditionNodeFormRef" + @keydown.stop + @submit.prevent + @click.stop + @mousedown.stop >