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
95452312
authored
Mar 13, 2025
by
lizhixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review:重构代码
parent
49cca0cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
+7
-10
No files found.
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
View file @
95452312
...
...
@@ -749,19 +749,16 @@ const selectNextAssigneesConfirm = (id: string, userList: any[]) => {
}
/** 审批通过时,校验每个自选审批人的节点是否都已配置了审批人 */
const
validateNextAssignees
=
()
=>
{
// TODO @小北:可以考虑 Object.keys(nextAssigneesActivityNode.value).length === 0) return true;减少括号层级
if
(
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
}
// 校验每个节点是否都已配置审批人
for
(
const
item
of
nextAssigneesActivityNode
.
value
)
{
if
(
isEmpty
(
approveReasonForm
.
nextAssignees
[
item
.
id
]))
{
console
.
log
(
'下一个节点【'
+
item
.
name
+
'】的审批人不能为空!'
)
message
.
warning
(
'下一个节点的审批人不能为空!'
)
return
false
}
}
return
true
}
/** 处理审批通过和不通过的操作 */
...
...
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