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
8244050e
authored
Mar 05, 2025
by
lizhixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review:代码审查
parent
3725e9d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
11 deletions
+26
-11
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
+26
-11
No files found.
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
View file @
8244050e
...
@@ -44,7 +44,11 @@
...
@@ -44,7 +44,11 @@
:rows=
"4"
:rows=
"4"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"下一个节点的审批人"
prop=
"nextAssignees"
v-if=
"nextAssigneesActivityNode.length > 0"
>
<el-form-item
label=
"下一个节点的审批人"
prop=
"nextAssignees"
v-if=
"nextAssigneesActivityNode.length > 0"
>
<div
class=
"ml-10px -mt-15px -mb-35px"
>
<div
class=
"ml-10px -mt-15px -mb-35px"
>
<ProcessInstanceTimeline
<ProcessInstanceTimeline
:activity-nodes=
"nextAssigneesActivityNode"
:activity-nodes=
"nextAssigneesActivityNode"
...
@@ -725,11 +729,12 @@ const initNextAssigneesFormField = async () => {
...
@@ -725,11 +729,12 @@ const initNextAssigneesFormField = async () => {
})
})
if
(
data
&&
data
.
length
>
0
)
{
if
(
data
&&
data
.
length
>
0
)
{
data
.
forEach
((
node
:
any
)
=>
{
data
.
forEach
((
node
:
any
)
=>
{
// 如果是发起人自选,并且没有审批人 或者 是审批人自选
if
(
if
(
isEmpty
(
node
.
tasks
)
&&
(
isEmpty
(
node
.
tasks
)
&&
isEmpty
(
node
.
candidateUsers
)
&&
isEmpty
(
node
.
candidateUsers
)
&&
(
CandidateStrategy
.
START_USER_SELECT
===
node
.
candidateStrategy
||
CandidateStrategy
.
START_USER_SELECT
===
node
.
candidateStrategy
)
||
CandidateStrategy
.
APPROVE_USER_SELECT
===
node
.
candidateStrategy
)
CandidateStrategy
.
APPROVE_USER_SELECT
===
node
.
candidateStrategy
)
{
)
{
nextAssigneesActivityNode
.
value
.
push
(
node
)
nextAssigneesActivityNode
.
value
.
push
(
node
)
}
}
...
@@ -741,6 +746,20 @@ const initNextAssigneesFormField = async () => {
...
@@ -741,6 +746,20 @@ const initNextAssigneesFormField = async () => {
const
selectNextAssigneesConfirm
=
(
id
:
string
,
userList
:
any
[])
=>
{
const
selectNextAssigneesConfirm
=
(
id
:
string
,
userList
:
any
[])
=>
{
approveReasonForm
.
nextAssignees
[
id
]
=
userList
?.
map
((
item
:
any
)
=>
item
.
id
)
approveReasonForm
.
nextAssignees
[
id
]
=
userList
?.
map
((
item
:
any
)
=>
item
.
id
)
}
}
/** 审批通过时,校验每个自选审批人的节点是否都已配置了审批人 */
const
validateNextAssignees
=
()
=>
{
// 如果需要自选审批人,则校验自选审批人
if
(
Object
.
keys
(
nextAssigneesActivityNode
.
value
).
length
>
0
)
{
// 校验每个节点是否都已配置审批人
for
(
const
item
of
nextAssigneesActivityNode
.
value
)
{
if
(
isEmpty
(
approveReasonForm
.
nextAssignees
[
item
.
id
]))
{
message
.
warning
(
'下一个节点的审批人不能为空!'
)
return
false
}
}
}
return
true
}
/** 处理审批通过和不通过的操作 */
/** 处理审批通过和不通过的操作 */
const
handleAudit
=
async
(
pass
:
boolean
,
formRef
:
FormInstance
|
undefined
)
=>
{
const
handleAudit
=
async
(
pass
:
boolean
,
formRef
:
FormInstance
|
undefined
)
=>
{
...
@@ -757,12 +776,8 @@ const handleAudit = async (pass: boolean, formRef: FormInstance | undefined) =>
...
@@ -757,12 +776,8 @@ const handleAudit = async (pass: boolean, formRef: FormInstance | undefined) =>
}
}
if
(
pass
)
{
if
(
pass
)
{
// 如果需要自选审批人,则校验自选审批人
const
nextAssigneesValid
=
validateNextAssignees
()
if
(
Object
.
keys
(
nextAssigneesActivityNode
.
value
).
length
>
0
if
(
!
nextAssigneesValid
)
return
&&
Object
.
keys
(
approveReasonForm
.
nextAssignees
).
length
===
0
)
{
message
.
warning
(
'下一个节点的审批人不能为空!'
)
return
}
const
variables
=
getUpdatedProcessInstanceVariables
()
const
variables
=
getUpdatedProcessInstanceVariables
()
// 审批通过数据
// 审批通过数据
const
data
=
{
const
data
=
{
...
...
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