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
c2768528
authored
Oct 17, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review:修复工作流的审批界面报错问题
parent
0242c841
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
31 deletions
+28
-31
src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue
+22
-25
src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue
+6
-6
No files found.
src/views/bpm/processInstance/detail/ProcessInstanceChildrenTaskList.vue
View file @
c2768528
<
template
>
<
template
>
<el-drawer
v-model=
"drawerVisible"
title=
"子任务"
size=
"70%"
>
<el-drawer
v-model=
"drawerVisible"
title=
"子任务"
size=
"70%"
>
<!-- 当前任务 -->
<template
#
header
>
<template
#
header
>
<h4>
【
{{
baseTask
.
name
}}
】审批人:
{{
baseTask
.
assigneeUser
?.
nickname
}}
</h4>
<h4>
【
{{
baseTask
.
name
}}
】审批人:
{{
baseTask
.
assigneeUser
?.
nickname
}}
</h4>
<el-button
style=
"margin-left: 5px"
v-if=
"showSubSignButton(baseTask)"
type=
"danger"
plain
@
click=
"handleSubSign(baseTask)"
>
<el-button
<Icon
icon=
"ep:remove"
/>
style=
"margin-left: 5px"
减签
v-if=
"isSubSignButtonVisible(baseTask)"
type=
"danger"
plain
@
click=
"handleSubSign(baseTask)"
>
<Icon
icon=
"ep:remove"
/>
减签
</el-button>
</el-button>
</
template
>
</
template
>
<el-table
:data=
"tableData"
style=
"width: 100%"
row-key=
"id"
border
>
<!-- 子任务列表 -->
<el-table
:data=
"baseTask.children"
style=
"width: 100%"
row-key=
"id"
border
>
<el-table-column
prop=
"assigneeUser.nickname"
label=
"审批人"
/>
<el-table-column
prop=
"assigneeUser.nickname"
label=
"审批人"
/>
<el-table-column
prop=
"assigneeUser.deptName"
label=
"所在部门"
/>
<el-table-column
prop=
"assigneeUser.deptName"
label=
"所在部门"
/>
<el-table-column
label=
"审批状态"
prop=
"result"
>
<el-table-column
label=
"审批状态"
prop=
"result"
>
...
@@ -32,13 +39,12 @@
...
@@ -32,13 +39,12 @@
<el-table-column
label=
"操作"
prop=
"operation"
>
<el-table-column
label=
"操作"
prop=
"operation"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
v-if=
"
showSubSignButton
(scope.row)"
v-if=
"
isSubSignButtonVisible
(scope.row)"
type=
"danger"
type=
"danger"
plain
plain
@
click=
"handleSubSign(scope.row)"
@
click=
"handleSubSign(scope.row)"
>
>
<Icon
icon=
"ep:remove"
/>
<Icon
icon=
"ep:remove"
/>
减签
减签
</el-button>
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -53,12 +59,11 @@ import { DICT_TYPE } from '@/utils/dict'
...
@@ -53,12 +59,11 @@ import { DICT_TYPE } from '@/utils/dict'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
TaskSubSignDialogForm
from
'./TaskSubSignDialogForm.vue'
import
TaskSubSignDialogForm
from
'./TaskSubSignDialogForm.vue'
const
message
=
useMessage
()
// 消息弹窗
defineOptions
({
name
:
'ProcessInstanceChildrenTaskList'
})
defineOptions
({
name
:
'ProcessInstancechildrenList'
})
const
message
=
useMessage
()
// 消息弹窗
const
drawerVisible
=
ref
(
false
)
// 抽屉的是否展示
const
drawerVisible
=
ref
(
false
)
// 抽屉的是否展示
const
tableData
=
ref
<
any
[]
>
([])
//表格数据
const
baseTask
=
ref
<
object
>
({})
const
baseTask
=
ref
<
object
>
({})
/** 打开弹窗 */
/** 打开弹窗 */
const
open
=
async
(
task
:
any
)
=>
{
const
open
=
async
(
task
:
any
)
=>
{
...
@@ -67,30 +72,22 @@ const open = async (task: any) => {
...
@@ -67,30 +72,22 @@ const open = async (task: any) => {
return
return
}
}
baseTask
.
value
=
task
baseTask
.
value
=
task
//设置表格数据
// 展开抽屉
tableData
.
value
=
task
.
children
//展开抽屉
drawerVisible
.
value
=
true
drawerVisible
.
value
=
true
}
}
defineExpose
({
open
})
// 提供 openModal 方法,用于打开弹窗
defineExpose
({
open
})
// 提供 openModal 方法,用于打开弹窗
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
/** 发起减签 */
/**
* 减签
*/
const
taskSubSignDialogForm
=
ref
()
const
taskSubSignDialogForm
=
ref
()
const
handleSubSign
=
(
item
)
=>
{
const
handleSubSign
=
(
item
)
=>
{
taskSubSignDialogForm
.
value
.
open
(
item
.
id
)
taskSubSignDialogForm
.
value
.
open
(
item
.
id
)
// TODO @海洋:减签后,需要刷新下界面哈
}
}
/**
/** 是否显示减签按钮 */
* 显示减签按钮
const
isSubSignButtonVisible
=
(
task
:
any
)
=>
{
* @param task
if
(
task
&&
task
.
children
&&
!
isEmpty
(
task
.
children
))
{
*/
// 有子任务,且子任务有任意一个是 待处理 和 待前置任务完成 则显示减签按钮
const
showSubSignButton
=
(
task
:
any
)
=>
{
if
(
!
isEmpty
(
task
.
children
)){
//有子任务,且子任务有任意一个是 待处理 和 待前置任务完成 则显示减签按钮
const
subTask
=
task
.
children
.
find
((
item
)
=>
item
.
result
===
1
||
item
.
result
===
9
)
const
subTask
=
task
.
children
.
find
((
item
)
=>
item
.
result
===
1
||
item
.
result
===
9
)
return
!
isEmpty
(
subTask
)
return
!
isEmpty
(
subTask
)
}
}
...
...
src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue
View file @
c2768528
...
@@ -22,12 +22,12 @@
...
@@ -22,12 +22,12 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<template
#
footer
>
<template
#
footer
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm('before')"
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm('before')"
>
>
向前加签
</el-button
向前加签
>
</el-button
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm('after')"
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm('after')"
>
>
向后加签
</el-button
向后加签
>
</el-button
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</
template
>
</
template
>
</Dialog>
</Dialog>
...
...
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