Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7508eb59
authored
Mar 23, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能修复】BPM:创建流程-SIMPLE设计器-多个条件时-最新的条件会覆盖上层所有的条件
parent
a1868064
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
17 deletions
+37
-17
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+3
-2
src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue
+6
-5
src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue
+2
-1
src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue
+4
-3
src/components/SimpleProcessDesignerV2/src/nodes/ExclusiveNode.vue
+11
-3
src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue
+11
-3
No files found.
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
View file @
7508eb59
...
...
@@ -91,6 +91,7 @@ import {
DEFAULT_CONDITION_GROUP_VALUE
}
from
'./consts'
import
{
generateUUID
}
from
'@/utils'
import
{
cloneDeep
}
from
'lodash-es'
defineOptions
({
name
:
'NodeHandler'
...
...
@@ -184,7 +185,7 @@ const addNode = (type: number) => {
conditionSetting
:
{
defaultFlow
:
false
,
conditionType
:
ConditionType
.
RULE
,
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
}
},
{
...
...
@@ -242,7 +243,7 @@ const addNode = (type: number) => {
conditionSetting
:
{
defaultFlow
:
false
,
conditionType
:
ConditionType
.
RULE
,
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
}
},
{
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue
View file @
7508eb59
...
...
@@ -254,6 +254,7 @@ import {
import
{
useWatchNode
,
useDrawer
,
useNodeName
,
useFormFields
,
getConditionShowText
}
from
'../node'
import
HttpRequestSetting
from
'./components/HttpRequestSetting.vue'
import
ConditionDialog
from
'./components/ConditionDialog.vue'
import
{
cloneDeep
}
from
'lodash-es'
const
{
proxy
}
=
getCurrentInstance
()
as
any
defineOptions
({
...
...
@@ -290,7 +291,7 @@ const configForm = ref<TriggerSetting>({
},
formSettings
:
[
{
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
,
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
,
updateFormFields
:
{},
deleteFields
:
[]
}
...
...
@@ -346,7 +347,7 @@ const changeTriggerType = () => {
?
originalSetting
.
formSettings
:
[
{
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
,
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
,
updateFormFields
:
{},
deleteFields
:
[]
}
...
...
@@ -361,7 +362,7 @@ const changeTriggerType = () => {
?
originalSetting
.
formSettings
:
[
{
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
,
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
,
updateFormFields
:
undefined
,
deleteFields
:
[]
}
...
...
@@ -374,7 +375,7 @@ const changeTriggerType = () => {
/** 添加新的修改表单设置 */
const
addFormSetting
=
()
=>
{
configForm
.
value
.
formSettings
!
.
push
({
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
,
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
,
updateFormFields
:
{},
deleteFields
:
[]
})
...
...
@@ -509,7 +510,7 @@ const showTriggerNodeConfig = (node: SimpleFlowNode) => {
},
formSettings: node.triggerSetting.formSettings || [
{
conditionGroups:
DEFAULT_CONDITION_GROUP_VALUE
,
conditionGroups:
cloneDeep(DEFAULT_CONDITION_GROUP_VALUE)
,
updateFormFields: {},
deleteFields: []
}
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/components/Condition.vue
View file @
7508eb59
...
...
@@ -154,6 +154,7 @@ import {
}
from
'../../consts'
import
{
BpmModelFormType
}
from
'@/utils/constants'
import
{
useFormFieldsAndStartUser
}
from
'../../node'
import
{
cloneDeep
}
from
'lodash-es'
const
props
=
defineProps
({
modelValue
:
{
...
...
@@ -196,7 +197,7 @@ const formRef = ref() // 表单 Ref
const
changeConditionType
=
()
=>
{
if
(
condition
.
value
.
conditionType
===
ConditionType
.
RULE
)
{
if
(
!
condition
.
value
.
conditionGroups
)
{
condition
.
value
.
conditionGroups
=
DEFAULT_CONDITION_GROUP_VALUE
condition
.
value
.
conditionGroups
=
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
}
}
}
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue
View file @
7508eb59
<!-- TODO @jason:有可能,它里面套 Condition 么? -->
<!-- TODO 怕影响其它节点功能,后面看看如何如何复用 Condtion -->
<!-- TODO 怕影响其它节点功能,后面看看如何如何复用 Condtion -->
<
template
>
<Dialog
v-model=
"dialogVisible"
title=
"条件配置"
width=
"600px"
:fullscreen=
"false"
>
<div
class=
"h-410px"
>
...
...
@@ -165,6 +165,7 @@ import {
}
from
'../../consts'
import
{
BpmModelFormType
}
from
'@/utils/constants'
import
{
useFormFieldsAndStartUser
}
from
'../../node'
import
{
cloneDeep
}
from
'lodash-es'
defineOptions
({
name
:
'ConditionDialog'
})
...
...
@@ -175,7 +176,7 @@ const condition = ref<{
conditionGroups
?:
ConditionGroup
}
>
({
conditionType
:
ConditionType
.
RULE
,
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
})
const
emit
=
defineEmits
<
{
...
...
@@ -210,7 +211,7 @@ const formRef = ref() // 表单 Ref
const
changeConditionType
=
()
=>
{
if
(
condition
.
value
.
conditionType
===
ConditionType
.
RULE
)
{
if
(
!
condition
.
value
.
conditionGroups
)
{
condition
.
value
.
conditionGroups
=
DEFAULT_CONDITION_GROUP_VALUE
condition
.
value
.
conditionGroups
=
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
}
}
}
...
...
src/components/SimpleProcessDesignerV2/src/nodes/ExclusiveNode.vue
View file @
7508eb59
...
...
@@ -108,11 +108,18 @@
<
script
setup
lang=
"ts"
>
import
NodeHandler
from
'../NodeHandler.vue'
import
ProcessNodeTree
from
'../ProcessNodeTree.vue'
import
{
SimpleFlowNode
,
NodeType
,
ConditionType
,
DEFAULT_CONDITION_GROUP_VALUE
,
NODE_DEFAULT_TEXT
}
from
'../consts'
import
{
SimpleFlowNode
,
NodeType
,
ConditionType
,
DEFAULT_CONDITION_GROUP_VALUE
,
NODE_DEFAULT_TEXT
}
from
'../consts'
import
{
getDefaultConditionNodeName
}
from
'../utils'
import
{
useTaskStatusClass
}
from
'../node'
import
{
generateUUID
}
from
'@/utils'
import
ConditionNodeConfig
from
'../nodes-config/ConditionNodeConfig.vue'
import
{
cloneDeep
}
from
'lodash-es'
const
{
proxy
}
=
getCurrentInstance
()
as
any
defineOptions
({
name
:
'ExclusiveNode'
...
...
@@ -149,7 +156,8 @@ const blurEvent = (index: number) => {
showInputs
.
value
[
index
]
=
false
const
conditionNode
=
currentNode
.
value
.
conditionNodes
?.
at
(
index
)
as
SimpleFlowNode
conditionNode
.
name
=
conditionNode
.
name
||
getDefaultConditionNodeName
(
index
,
conditionNode
.
conditionSetting
?.
defaultFlow
)
conditionNode
.
name
||
getDefaultConditionNodeName
(
index
,
conditionNode
.
conditionSetting
?.
defaultFlow
)
}
// 点击条件名称
...
...
@@ -181,7 +189,7 @@ const addCondition = () => {
conditionSetting
:
{
defaultFlow
:
false
,
conditionType
:
ConditionType
.
RULE
,
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
}
}
conditionNodes
.
splice
(
lastIndex
,
0
,
conditionData
)
...
...
src/components/SimpleProcessDesignerV2/src/nodes/InclusiveNode.vue
View file @
7508eb59
...
...
@@ -110,11 +110,18 @@
<
script
setup
lang=
"ts"
>
import
NodeHandler
from
'../NodeHandler.vue'
import
ProcessNodeTree
from
'../ProcessNodeTree.vue'
import
{
SimpleFlowNode
,
NodeType
,
ConditionType
,
DEFAULT_CONDITION_GROUP_VALUE
,
NODE_DEFAULT_TEXT
}
from
'../consts'
import
{
SimpleFlowNode
,
NodeType
,
ConditionType
,
DEFAULT_CONDITION_GROUP_VALUE
,
NODE_DEFAULT_TEXT
}
from
'../consts'
import
{
useTaskStatusClass
}
from
'../node'
import
{
getDefaultInclusiveConditionNodeName
}
from
'../utils'
import
{
generateUUID
}
from
'@/utils'
import
ConditionNodeConfig
from
'../nodes-config/ConditionNodeConfig.vue'
import
{
cloneDeep
}
from
'lodash-es'
const
{
proxy
}
=
getCurrentInstance
()
as
any
defineOptions
({
name
:
'InclusiveNode'
...
...
@@ -153,7 +160,8 @@ const blurEvent = (index: number) => {
showInputs
.
value
[
index
]
=
false
const
conditionNode
=
currentNode
.
value
.
conditionNodes
?.
at
(
index
)
as
SimpleFlowNode
conditionNode
.
name
=
conditionNode
.
name
||
getDefaultInclusiveConditionNodeName
(
index
,
conditionNode
.
conditionSetting
?.
defaultFlow
)
conditionNode
.
name
||
getDefaultInclusiveConditionNodeName
(
index
,
conditionNode
.
conditionSetting
?.
defaultFlow
)
}
// 点击条件名称
...
...
@@ -185,7 +193,7 @@ const addCondition = () => {
conditionSetting
:
{
defaultFlow
:
false
,
conditionType
:
ConditionType
.
RULE
,
conditionGroups
:
DEFAULT_CONDITION_GROUP_VALUE
conditionGroups
:
cloneDeep
(
DEFAULT_CONDITION_GROUP_VALUE
)
}
}
conditionNodes
.
splice
(
lastIndex
,
0
,
conditionData
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment