From 0e7dbbb04d354332dfb543a0fbbd0b2d62fff153 Mon Sep 17 00:00:00 2001
From: jason <2667446@qq.com>
Date: Sun, 26 May 2024 11:02:04 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81=E7=A8=8B?=
=?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8-=20=E5=AE=A1=E6=89=B9=E8=8A=82?=
=?UTF-8?q?=E7=82=B9=E9=85=8D=E7=BD=AE=E6=96=B0=E5=A2=9E=E6=8B=92=E7=BB=9D?=
=?UTF-8?q?=E5=A4=84=E7=90=86=E6=96=B9=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/NodeHandler.vue | 54 +++++----
.../src/ProcessNodeTree.vue | 111 ++++++++++++------
.../src/SimpleProcessDesigner.vue | 16 ++-
.../SimpleProcessDesignerV2/src/consts.ts | 21 +++-
.../src/nodes-config/UserTaskNodeConfig.vue | 50 +++++++-
.../src/nodes/ExclusiveNode.vue | 30 ++++-
.../src/nodes/UserTaskNode.vue | 11 +-
7 files changed, 221 insertions(+), 72 deletions(-)
diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
index d13b7365..e751dbd5 100644
--- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
@@ -1,37 +1,42 @@
-
-
-
+const findFromParentNode = (
+ nodeList: SimpleFlowNode[],
+ nodeType: number
+) => {
+ emits('find:recursiveFindParentNode', nodeList, props.parentNode, nodeType)
+}
+
+// 递归从父节点中查询匹配的节点
+const recursiveFindParentNode = (
+ nodeList: SimpleFlowNode[],
+ findNode: SimpleFlowNode,
+ nodeType: number
+) => {
+ if (!findNode || findNode.type === NodeType.START_EVENT_NODE) {
+ return
+ }
+
+ if (findNode.type === nodeType) {
+ nodeList.push(findNode)
+ }
+ emits('find:recursiveFindParentNode', nodeList, props.parentNode, nodeType)
+}
+
+
diff --git a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
index 76dc9b40..a9cf18d1 100644
--- a/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
+++ b/src/components/SimpleProcessDesignerV2/src/SimpleProcessDesigner.vue
@@ -15,7 +15,7 @@