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
1de17cad
authored
Feb 19, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】BPM:触发器,修改节点的评审
parent
78d8782b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
19 deletions
+16
-19
src/components/SimpleProcessDesignerV2/src/node.ts
+6
-6
src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue
+2
-3
src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue
+3
-9
src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue
+5
-1
No files found.
src/components/SimpleProcessDesignerV2/src/node.ts
View file @
1de17cad
...
@@ -551,21 +551,21 @@ export function useTaskStatusClass(taskStatus: TaskStatusEnum | undefined): stri
...
@@ -551,21 +551,21 @@ export function useTaskStatusClass(taskStatus: TaskStatusEnum | undefined): stri
/** 条件组件文字展示 */
/** 条件组件文字展示 */
export function getConditionShowText(
export function getConditionShowText(
conditonType: ConditionType | undefined,
condit
i
onType: ConditionType | undefined,
conditionExpression: string | undefined,
conditionExpression: string | undefined,
conditionGroups: ConditionGroup | undefined,
conditionGroups: ConditionGroup | undefined,
fieldOptions: Array<Record<string, any>>
fieldOptions: Array<Record<string, any>>
) {
) {
let showText = ''
let showText = ''
if (conditonType === ConditionType.EXPRESSION) {
if (condit
i
onType === ConditionType.EXPRESSION) {
if (conditionExpression) {
if (conditionExpression) {
showText = `
表达式:
$
{
conditionExpression
}
`
showText = `
表达式:
$
{
conditionExpression
}
`
}
}
}
}
if (conditonType === ConditionType.RULE) {
if (condit
i
onType === ConditionType.RULE) {
// 条件组是否为与关系
// 条件组是否为与关系
const groupAnd = conditionGroups?.and
const groupAnd = conditionGroups?.and
let warningMes
g
: undefined | string = undefined
let warningMes
sage
: undefined | string = undefined
const conditionGroup = conditionGroups?.conditions.map((item) => {
const conditionGroup = conditionGroups?.conditions.map((item) => {
return (
return (
'(' +
'(' +
...
@@ -581,7 +581,7 @@ export function getConditionShowText(
...
@@ -581,7 +581,7 @@ export function getConditionShowText(
)
)
} else {
} else {
// 有一条规则不完善。提示错误
// 有一条规则不完善。提示错误
warningMes
g
= '请完善条件规则'
warningMes
sage
= '请完善条件规则'
return ''
return ''
}
}
})
})
...
@@ -589,7 +589,7 @@ export function getConditionShowText(
...
@@ -589,7 +589,7 @@ export function getConditionShowText(
' ) '
' ) '
)
)
})
})
if (warningMes
g
) {
if (warningMes
sage
) {
showText = ''
showText = ''
} else {
} else {
showText = conditionGroup!.join(groupAnd ? ' 且 ' : ' 或 ')
showText = conditionGroup!.join(groupAnd ? ' 且 ' : ' 或 ')
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue
View file @
1de17cad
...
@@ -104,11 +104,10 @@ const handleClose = async (done: (cancel?: boolean) => void) => {
...
@@ -104,11 +104,10 @@ const handleClose = async (done: (cancel?: boolean) => void) => {
done
()
done
()
}
}
}
}
// 流程表单字段和发起人字段
const
fieldOptions
=
useFormFieldsAndStartUser
()
/** 保存配置 */
const
fieldOptions
=
useFormFieldsAndStartUser
()
// 流程表单字段和发起人字段
const
conditionRef
=
ref
()
const
conditionRef
=
ref
()
// 保存配置
const
saveConfig
=
async
()
=>
{
const
saveConfig
=
async
()
=>
{
if
(
!
currentNode
.
value
.
conditionSetting
?.
defaultFlow
)
{
if
(
!
currentNode
.
value
.
conditionSetting
?.
defaultFlow
)
{
// 校验表单
// 校验表单
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue
View file @
1de17cad
...
@@ -252,17 +252,11 @@ import {
...
@@ -252,17 +252,11 @@ import {
FormTriggerSetting
,
FormTriggerSetting
,
DEFAULT_CONDITION_GROUP_VALUE
DEFAULT_CONDITION_GROUP_VALUE
}
from
'../consts'
}
from
'../consts'
import
{
import
{
useWatchNode
,
useDrawer
,
useNodeName
,
useFormFields
,
getConditionShowText
}
from
'../node'
useWatchNode
,
useDrawer
,
useNodeName
,
useFormFields
,
useFormFieldsAndStartUser
,
getConditionShowText
}
from
'../node'
import
HttpRequestParamSetting
from
'./components/HttpRequestParamSetting.vue'
import
HttpRequestParamSetting
from
'./components/HttpRequestParamSetting.vue'
import
ConditionDialog
from
'./components/ConditionDialog.vue'
import
ConditionDialog
from
'./components/ConditionDialog.vue'
const
{
proxy
}
=
getCurrentInstance
()
as
any
const
{
proxy
}
=
getCurrentInstance
()
as
any
defineOptions
({
defineOptions
({
name
:
'TriggerNodeConfig'
name
:
'TriggerNodeConfig'
})
})
...
@@ -314,7 +308,7 @@ const optionalUpdateFormFields = computed(() => {
...
@@ -314,7 +308,7 @@ const optionalUpdateFormFields = computed(() => {
}))
}))
})
})
/** 添加 HTTP 请求返回值设置项*/
/** 添加 HTTP 请求返回值设置项
*/
const
addHttpResponseSetting
=
(
responseSetting
:
Record
<
string
,
string
>
[])
=>
{
const
addHttpResponseSetting
=
(
responseSetting
:
Record
<
string
,
string
>
[])
=>
{
responseSetting
.
push
({
responseSetting
.
push
({
key
:
''
,
key
:
''
,
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/components/ConditionDialog.vue
View file @
1de17cad
<!-- TODO @jason:有可能,它里面套 Condition 么? -->
<
template
>
<
template
>
<Dialog
v-model=
"dialogVisible"
title=
"条件配置"
width=
"600px"
:fullscreen=
"false"
>
<Dialog
v-model=
"dialogVisible"
title=
"条件配置"
width=
"600px"
:fullscreen=
"false"
>
<div
class=
"h-410px"
>
<div
class=
"h-410px"
>
...
@@ -106,7 +107,10 @@
...
@@ -106,7 +107,10 @@
<el-input
v-model=
"rule.rightSide"
style=
"width: 160px"
/>
<el-input
v-model=
"rule.rightSide"
style=
"width: 160px"
/>
</el-form-item>
</el-form-item>
</div>
</div>
<div
class=
"cursor-pointer mr-1 flex items-center"
v-if=
"equation.rules.length > 1"
>
<div
class=
"cursor-pointer mr-1 flex items-center"
v-if=
"equation.rules.length > 1"
>
<Icon
<Icon
icon=
"ep:delete"
icon=
"ep:delete"
:size=
"18"
:size=
"18"
...
...
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