From eb6f7a3c0a557e6d4d458ce5df75d32b11ce2b7b Mon Sep 17 00:00:00 2001 From: tanlianwang Date: Wed, 11 Mar 2026 09:54:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(workflow):=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E8=8A=82=E7=82=B9=E7=B1=BB=E5=9E=8B=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E5=92=8C=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加对模型类型的安全检查,防止空值导致的错误 - 修复条件节点和循环节点中的数组访问安全性问题 - 统一工作流模式注入和传递机制 - 优化节点拖拽事件处理,确保事件对象正确传递 - 修复循环体节点字段列表获取的安全性检查 - 调整图形渲染逻辑,避免空画布时的视图适配问题 - 更新依赖版本以解决兼容性问题 --- Docker外挂配置指南.md | 2 +- static/admin/index.html | 2 +- ui/package.json | 2 +- .../component/DropdownMenu.vue | 10 +++---- .../component/NodeContent.vue | 4 +-- ui/src/views/application-workflow/index.vue | 2 ++ ui/src/workflow/common/NodeContainer.vue | 19 +++++------- ui/src/workflow/common/app-node.ts | 30 +++++++++---------- ui/src/workflow/index.vue | 22 +++++++++----- ui/src/workflow/nodes/condition-node/index.ts | 11 +++---- .../nodes/intent-classify-node/index.ts | 7 +++-- .../loop-body-node/LoopBodyContainer.vue | 4 +-- ui/src/workflow/nodes/loop-body-node/index.ts | 9 ++++-- .../workflow/nodes/loop-body-node/index.vue | 7 ----- ui/src/workflow/nodes/loop-node/index.ts | 4 +-- .../workflow/nodes/loop-start-node/index.ts | 7 +++-- 16 files changed, 73 insertions(+), 69 deletions(-) diff --git a/Docker外挂配置指南.md b/Docker外挂配置指南.md index 42a0c565b..f92c1b7cd 100644 --- a/Docker外挂配置指南.md +++ b/Docker外挂配置指南.md @@ -27,7 +27,7 @@ ### 1.3 镜像打包 -1. docker build -f installer/Dockerfile -t maxkb:latest +1. docker build -f installer/Dockerfile -t maxkb:latest . ## 2. 数据库外挂配置 diff --git a/static/admin/index.html b/static/admin/index.html index 349dcce87..3b5767d39 100644 --- a/static/admin/index.html +++ b/static/admin/index.html @@ -3,4 +3,4 @@ prefix: '/admin', chatPrefix: '/chat', } - })()
\ No newline at end of file + })()
\ No newline at end of file diff --git a/ui/package.json b/ui/package.json index 004cb41e4..95eb6c884 100644 --- a/ui/package.json +++ b/ui/package.json @@ -21,7 +21,7 @@ "@codemirror/lang-python": "^6.2.1", "@codemirror/theme-one-dark": "^6.1.2", "@logicflow/core": "^1.2.27", - "@logicflow/extension": "^2.1.15", + "@logicflow/extension": "^1.2.27", "@vavt/cm-extension": "^1.9.1", "@vueuse/core": "^13.3.0", "axios": "^1.8.4", diff --git a/ui/src/views/application-workflow/component/DropdownMenu.vue b/ui/src/views/application-workflow/component/DropdownMenu.vue index 3f535844a..732e48ce1 100644 --- a/ui/src/views/application-workflow/component/DropdownMenu.vue +++ b/ui/src/views/application-workflow/component/DropdownMenu.vue @@ -38,7 +38,7 @@ class="list-item flex align-center border border-r-6 p-8-12 cursor" style="width: calc(50% - 6px)" @click.stop="clickNodes(item)" - @mousedown.stop="onmousedown(item)" + @mousedown="onmousedown(item, undefined, undefined, $event)" > @@ -112,7 +112,7 @@ @@ -208,7 +208,7 @@ function clickNodes(item: any, data?: any, type?: string) { emit('clickNodes', item) } -function onmousedown(item: any, data?: any, type?: string) { +function onmousedown(item: any, data?: any, type?: string, event?: MouseEvent) { if (data) { item['properties']['stepName'] = data.name if (type == 'tool') { @@ -239,7 +239,7 @@ function onmousedown(item: any, data?: any, type?: string) { } } } - props.workflowRef?.onmousedown(item) + props.workflowRef?.onmousedown(item, event) emit('onmousedown', item) } diff --git a/ui/src/views/application-workflow/component/NodeContent.vue b/ui/src/views/application-workflow/component/NodeContent.vue index 1476242ac..a4e228741 100644 --- a/ui/src/views/application-workflow/component/NodeContent.vue +++ b/ui/src/views/application-workflow/component/NodeContent.vue @@ -20,7 +20,7 @@ class="list-item flex align-center border border-r-6 p-8-12 cursor" style="width: calc(50% - 6px)" @click.stop="emit('clickNodes', item)" - @mousedown.stop="emit('onmousedown', item)" + @mousedown="emit('onmousedown', item, $event)" > () const filterText = ref('') diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue index 41382c0a3..0762ff2c8 100644 --- a/ui/src/views/application-workflow/index.vue +++ b/ui/src/views/application-workflow/index.vue @@ -159,7 +159,9 @@ import { ComplexPermission } from '@/utils/permission/type' import { EditionConst, PermissionConst, RoleConst } from '@/utils/permission/data' import permissionMap from '@/permission' import { loadSharedApi } from '@/utils/dynamics-api/shared-api' +import { WorkflowMode } from '@/enums/application' provide('getApplicationDetail', () => detail) +provide('workflowMode', WorkflowMode.Application) const { theme } = useStore() const router = useRouter() const route = useRoute() diff --git a/ui/src/workflow/common/NodeContainer.vue b/ui/src/workflow/common/NodeContainer.vue index e62d1ee4b..abb4e66a6 100644 --- a/ui/src/workflow/common/NodeContainer.vue +++ b/ui/src/workflow/common/NodeContainer.vue @@ -1,5 +1,5 @@