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
59528284
authored
Feb 25, 2025
by
lizhixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 流程审批,预测下个节点是否需要选择审批人
parent
b346545c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
+25
-0
src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue
+2
-3
No files found.
src/views/bpm/processInstance/detail/ProcessInstanceOperationButton.vue
View file @
59528284
...
...
@@ -695,6 +695,30 @@ const openPopover = async (type: string) => {
message
.
warning
(
'表单校验不通过,请先完善表单!!'
)
return
}
// 获取修改的流程变量, 暂时只支持流程表单
const
variables
=
getUpdatedProcessInstanceVariables
()
const
param
=
{
processInstanceId
:
props
.
processInstance
.
id
,
processVariablesStr
:
JSON
.
stringify
(
variables
)
}
// 流程通过时,根据表单变量查询新的流程节点,判断下一个节点类型是否为自选审批人
const
res
=
await
ProcessInstanceApi
.
getApprovalDetail
(
param
)
//当前待审批节点id
const
activityId
=
res
.
todoTask
?.
taskDefinitionKey
if
(
res
.
activityNodes
&&
res
.
activityNodes
.
length
>
0
)
{
// 找到当前节点的索引
const
currentNodeIndex
=
res
.
activityNodes
.
findIndex
((
node
)
=>
node
.
id
===
activityId
)
const
nextNode
=
res
.
activityNodes
[
currentNodeIndex
+
1
]
if
(
nextNode
.
candidateStrategy
===
CandidateStrategy
.
START_USER_SELECT
&&
!
nextNode
.
tasks
&&
nextNode
.
candidateUsers
?.
length
===
0
)
{
// 自选审批人,则弹出选择审批人弹窗
activityNodes
.
value
=
[
nextNode
]
dialogVisibleSelectApproveUser
.
value
=
true
}
}
}
if
(
type
===
'return'
)
{
// 获取退回节点
...
...
@@ -788,6 +812,7 @@ const handleAudit = async (pass: boolean, formRef: FormInstance | undefined) =>
}
await
TaskApi
.
approveTask
(
data
)
popOverVisible
.
value
.
approve
=
false
dialogVisibleSelectApproveUser
.
value
=
false
message
.
success
(
'审批通过成功'
)
}
else
{
// 审批不通过数据
...
...
src/views/bpm/processInstance/detail/ProcessInstanceSimpleViewer.vue
View file @
59528284
...
...
@@ -42,7 +42,7 @@ watch(
const
finishedSequenceFlowActivityIds
:
string
[]
=
newModelView
.
finishedSequenceFlowActivityIds
setSimpleModelNodeTaskStatus
(
newModelView
.
simpleModel
,
newModelView
.
processInstance
.
status
,
newModelView
.
processInstance
?
.
status
,
rejectedTaskActivityIds
,
unfinishedTaskActivityIds
,
finishedActivityIds
,
...
...
@@ -171,5 +171,4 @@ const setSimpleModelNodeTaskStatus = (
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
<
style
lang=
"scss"
scoped
></
style
>
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