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
0e452aa1
authored
Mar 06, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】BPM:下一个审批人
parent
202d4b67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
+1
-2
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
+4
-1
No files found.
src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
View file @
0e452aa1
...
...
@@ -117,7 +117,6 @@ const activityNodes = ref<ProcessInstanceApi.ApprovalNodeInfo[]>([]) // 审批
/** 设置表单信息、获取流程图数据 **/
const
initProcessInfo
=
async
(
row
:
any
,
formVariables
?:
any
)
=>
{
// 重置指定审批人
startUserSelectTasks
.
value
=
[]
startUserSelectAssignees
.
value
=
{}
...
...
@@ -144,7 +143,7 @@ const initProcessInfo = async (row: any, formVariables?: any) => {
id
:
row
.
id
,
processVariablesStr
:
JSON
.
stringify
(
formVariables
)
})
// }
// 加载流程图
const
processDefinitionDetail
=
await
DefinitionApi
.
getProcessDefinition
(
row
.
id
)
if
(
processDefinitionDetail
)
{
...
...
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
View file @
0e452aa1
...
...
@@ -729,11 +729,12 @@ const initNextAssigneesFormField = async () => {
})
if
(
data
&&
data
.
length
>
0
)
{
data
.
forEach
((
node
:
any
)
=>
{
// 如果是发起人自选,并且没有审批人 或者 是审批人自选
if
(
// 情况一:当前节点没有审批人,并且是发起人自选
(
isEmpty
(
node
.
tasks
)
&&
isEmpty
(
node
.
candidateUsers
)
&&
CandidateStrategy
.
START_USER_SELECT
===
node
.
candidateStrategy
)
||
// 情况二:当前节点是审批人自选
CandidateStrategy
.
APPROVE_USER_SELECT
===
node
.
candidateStrategy
)
{
nextAssigneesActivityNode
.
value
.
push
(
node
)
...
...
@@ -748,11 +749,13 @@ const selectNextAssigneesConfirm = (id: string, userList: any[]) => {
}
/** 审批通过时,校验每个自选审批人的节点是否都已配置了审批人 */
const
validateNextAssignees
=
()
=>
{
// TODO @小北:可以考虑 Object.keys(nextAssigneesActivityNode.value).length === 0) return true;减少括号层级
// 如果需要自选审批人,则校验自选审批人
if
(
Object
.
keys
(
nextAssigneesActivityNode
.
value
).
length
>
0
)
{
// 校验每个节点是否都已配置审批人
for
(
const
item
of
nextAssigneesActivityNode
.
value
)
{
if
(
isEmpty
(
approveReasonForm
.
nextAssignees
[
item
.
id
]))
{
// TODO @小北:可以打印下节点名,嘿嘿。
message
.
warning
(
'下一个节点的审批人不能为空!'
)
return
false
}
...
...
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