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
91c3b942
authored
Feb 27, 2025
by
jason
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/bpm' of
https://gitee.com/yudaocode/yudao-ui-admin-vue3
into feature/bpm
parents
7652c412
9994059c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
125 additions
and
51 deletions
+125
-51
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
+3
-0
src/components/SimpleProcessDesignerV2/src/consts.ts
+71
-13
src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
+0
-0
src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue
+33
-19
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
+18
-19
No files found.
src/components/SimpleProcessDesignerV2/src/NodeHandler.vue
View file @
91c3b942
...
...
@@ -306,6 +306,9 @@ const addNode = (type: number) => {
},
timeoutSetting
:
{
enable
:
false
},
multiInstanceSetting
:
{
enable
:
false
}
}
}
...
...
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
91c3b942
...
...
@@ -814,26 +814,84 @@ export const TRIGGER_TYPES: DictDataVO[] = [
export
type
ChildProcessSetting
=
{
calledProcessDefinitionKey
:
string
calledProcessDefinitionName
:
string
async
:
boolean
,
inVariables
?:
IOParameter
[],
outVariables
?:
IOParameter
[],
skipStartUserNode
:
boolean
,
startUserSetting
:
StartUserSetting
,
timeoutSetting
:
TimeoutSetting
,
async
:
boolean
inVariables
?:
IOParameter
[]
outVariables
?:
IOParameter
[]
skipStartUserNode
:
boolean
startUserSetting
:
StartUserSetting
timeoutSetting
:
TimeoutSetting
multiInstanceSetting
:
MultiInstanceSetting
}
export
type
IOParameter
=
{
source
:
string
sourceExpression
:
string
target
:
string
targetExpression
:
string
}
export
type
StartUserSetting
=
{
type
:
number
type
:
ChildProcessStartUserTypeEnum
formField
?:
string
emptyType
?:
number
emptyType
?:
ChildProcessStartUserEmptyTypeEnum
}
export
type
TimeoutSetting
=
{
enable
:
boolean
,
type
?:
DelayTypeEnum
,
timeExpression
?:
string
,
enable
:
boolean
type
?:
DelayTypeEnum
timeExpression
?:
string
}
export
type
MultiInstanceSetting
=
{
enable
:
boolean
sequential
?:
boolean
completeRatio
?:
number
sourceType
?:
ChildProcessMultiInstanceSourceTypeEnum
source
?:
string
}
export
enum
ChildProcessStartUserTypeEnum
{
/**
* 同主流程发起人
*/
MAIN_PROCESS_START_USER
=
1
,
/**
* 表单
*/
FROM_FORM
=
2
}
export
const
CHILD_PROCESS_START_USER_TYPE
=
[
{
label
:
'同主流程发起人'
,
value
:
ChildProcessStartUserTypeEnum
.
MAIN_PROCESS_START_USER
},
{
label
:
'表单'
,
value
:
ChildProcessStartUserTypeEnum
.
FROM_FORM
}
]
export
enum
ChildProcessStartUserEmptyTypeEnum
{
/**
* 同主流程发起人
*/
MAIN_PROCESS_START_USER
=
1
,
/**
* 子流程管理员
*/
CHILD_PROCESS_ADMIN
=
2
,
/**
* 主流程管理员
*/
MAIN_PROCESS_ADMIN
=
3
}
export
const
CHILD_PROCESS_START_USER_EMPTY_TYPE
=
[
{
label
:
'同主流程发起人'
,
value
:
ChildProcessStartUserEmptyTypeEnum
.
MAIN_PROCESS_START_USER
},
{
label
:
'子流程管理员'
,
value
:
ChildProcessStartUserEmptyTypeEnum
.
CHILD_PROCESS_ADMIN
},
{
label
:
'主流程管理员'
,
value
:
ChildProcessStartUserEmptyTypeEnum
.
MAIN_PROCESS_ADMIN
}
]
export
enum
ChildProcessMultiInstanceSourceTypeEnum
{
/**
* 固定数量
*/
FIXED_QUANTITY
=
1
,
/**
* 数字表单
*/
DIGITAL_FORM
=
2
,
/**
* 多项表单
*/
MULTI_FORM
=
3
}
export
const
CHILD_PROCESS_MULTI_INSTANCE_SOURCE_TYPE
=
[
{
label
:
'固定数量'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
FIXED_QUANTITY
},
{
label
:
'数字表单'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
DIGITAL_FORM
},
// TODO @lesan:DIGITAL 改成 NUMBER,和 Element plus 更接近?
{
label
:
'多项表单'
,
value
:
ChildProcessMultiInstanceSourceTypeEnum
.
MULTI_FORM
}
// TODO @lesan:多选表单?multiple 是这个解释。另外 MULTI => MULTIPLE
]
src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
View file @
91c3b942
This diff is collapsed.
Click to expand it.
src/components/SimpleProcessDesignerV2/src/nodes-config/ConditionNodeConfig.vue
View file @
91c3b942
...
...
@@ -48,7 +48,7 @@ import { getDefaultConditionNodeName } from '../utils'
import
{
useFormFieldsAndStartUser
,
getConditionShowText
}
from
'../node'
import
Condition
from
'./components/Condition.vue'
import
{
cloneDeep
}
from
'lodash-es'
const
message
=
useMessage
()
// 消息弹窗
defineOptions
({
name
:
'ConditionNodeConfig'
})
...
...
@@ -69,14 +69,18 @@ const condition = ref<any>({
conditionExpression
:
''
,
conditionGroups
:
{
and
:
true
,
conditions
:
[{
and
:
true
,
rules
:
[{
opCode
:
'=='
,
leftSide
:
''
,
rightSide
:
''
}]
}]
conditions
:
[
{
and
:
true
,
rules
:
[
{
opCode
:
'=='
,
leftSide
:
''
,
rightSide
:
''
}
]
}
]
}
})
const
open
=
()
=>
{
...
...
@@ -90,14 +94,18 @@ const open = () => {
conditionExpression
:
''
,
conditionGroups
:
{
and
:
true
,
conditions
:
[{
and
:
true
,
rules
:
[{
opCode
:
'=='
,
leftSide
:
''
,
rightSide
:
''
}]
}]
conditions
:
[
{
and
:
true
,
rules
:
[
{
opCode
:
'=='
,
leftSide
:
''
,
rightSide
:
''
}
]
}
]
}
}
}
...
...
@@ -162,8 +170,14 @@ const saveConfig = async () => {
currentNode
.
value
.
conditionSetting
=
cloneDeep
({
...
currentNode
.
value
.
conditionSetting
,
conditionType
:
condition
.
value
?.
conditionType
,
conditionExpression
:
condition
.
value
?.
conditionType
===
ConditionType
.
EXPRESSION
?
condition
.
value
?.
conditionExpression
:
undefined
,
conditionGroups
:
condition
.
value
?.
conditionType
===
ConditionType
.
RULE
?
condition
.
value
?.
conditionGroups
:
undefined
conditionExpression
:
condition
.
value
?.
conditionType
===
ConditionType
.
EXPRESSION
?
condition
.
value
?.
conditionExpression
:
undefined
,
conditionGroups
:
condition
.
value
?.
conditionType
===
ConditionType
.
RULE
?
condition
.
value
?.
conditionGroups
:
undefined
})
}
settingVisible
.
value
=
false
...
...
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
View file @
91c3b942
...
...
@@ -157,25 +157,24 @@ const initProcessInfo = async (row: any, formVariables?: any) => {
}
/** 预测流程节点会因为输入的参数值而产生新的预测结果值,所以需重新预测一次 */
// TODO @芋艿:这里我执行填写表单的时候不知道为啥一直报错,先注释了 @lesan:可以和群里的小北说下
// watch(
// detailForm.value,
// (newValue) => {
// if (newValue && Object.keys(newValue.value).length > 0) {
// // 记录之前的节点审批人
// tempStartUserSelectAssignees.value = startUserSelectAssignees.value
// startUserSelectAssignees.value = {}
// // 加载最新的审批详情
// getApprovalDetail({
// id: props.selectProcessDefinition.id,
// processVariablesStr: JSON.stringify(newValue.value) // 解决 GET 无法传递对象的问题,后端 String 再转 JSON
// })
// }
// },
// {
// immediate: true
// }
// )
watch
(
detailForm
.
value
,
(
newValue
)
=>
{
if
(
newValue
&&
Object
.
keys
(
newValue
.
value
).
length
>
0
)
{
// 记录之前的节点审批人
tempStartUserSelectAssignees
.
value
=
startUserSelectAssignees
.
value
startUserSelectAssignees
.
value
=
{}
// 加载最新的审批详情
getApprovalDetail
({
id
:
props
.
selectProcessDefinition
.
id
,
processVariablesStr
:
JSON
.
stringify
(
newValue
.
value
)
// 解决 GET 无法传递对象的问题,后端 String 再转 JSON
})
}
},
{
immediate
:
true
}
)
/** 获取审批详情 */
const
getApprovalDetail
=
async
(
row
:
any
)
=>
{
...
...
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