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
48f66247
authored
Mar 22, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BPM:新增【流程任务】菜单,用于全部流程任务的查询
parent
5286ad1c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
178 additions
and
8 deletions
+178
-8
src/api/bpm/task/index.ts
+6
-2
src/views/bpm/processInstance/index.vue
+1
-1
src/views/bpm/processInstance/manager/index.vue
+2
-2
src/views/bpm/task/done/index.vue
+2
-2
src/views/bpm/task/manager/index.vue
+166
-0
src/views/bpm/task/todo/index.vue
+1
-1
No files found.
src/api/bpm/task/index.ts
View file @
48f66247
...
@@ -4,14 +4,18 @@ export type TaskVO = {
...
@@ -4,14 +4,18 @@ export type TaskVO = {
id
:
number
id
:
number
}
}
export
const
getT
odoTask
Page
=
async
(
params
:
any
)
=>
{
export
const
getT
askTodo
Page
=
async
(
params
:
any
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/task/todo-page'
,
params
})
return
await
request
.
get
({
url
:
'/bpm/task/todo-page'
,
params
})
}
}
export
const
get
DoneTask
Page
=
async
(
params
:
any
)
=>
{
export
const
get
TaskDone
Page
=
async
(
params
:
any
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/task/done-page'
,
params
})
return
await
request
.
get
({
url
:
'/bpm/task/done-page'
,
params
})
}
}
export
const
getTaskManagerPage
=
async
(
params
:
any
)
=>
{
return
await
request
.
get
({
url
:
'/bpm/task/manager-page'
,
params
})
}
export
const
approveTask
=
async
(
data
:
any
)
=>
{
export
const
approveTask
=
async
(
data
:
any
)
=>
{
return
await
request
.
put
({
url
:
'/bpm/task/approve'
,
data
})
return
await
request
.
put
({
url
:
'/bpm/task/approve'
,
data
})
}
}
...
...
src/views/bpm/processInstance/index.vue
View file @
48f66247
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
width=
"180"
width=
"180"
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
/>
/>
<el-table-column
align=
"center"
label=
"耗时"
prop=
"durationInMillis"
width=
"1
2
0"
>
<el-table-column
align=
"center"
label=
"耗时"
prop=
"durationInMillis"
width=
"1
6
0"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
durationInMillis
>
0
?
formatPast2
(
scope
.
row
.
durationInMillis
)
:
'-'
}}
{{
scope
.
row
.
durationInMillis
>
0
?
formatPast2
(
scope
.
row
.
durationInMillis
)
:
'-'
}}
</
template
>
</
template
>
...
...
src/views/bpm/processInstance/manager/index.vue
View file @
48f66247
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
width=
"180"
width=
"180"
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
/>
/>
<el-table-column
align=
"center"
label=
"耗时"
prop=
"durationInMillis"
width=
"1
20
"
>
<el-table-column
align=
"center"
label=
"耗时"
prop=
"durationInMillis"
width=
"1
69
"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
durationInMillis
>
0
?
formatPast2
(
scope
.
row
.
durationInMillis
)
:
'-'
}}
{{
scope
.
row
.
durationInMillis
>
0
?
formatPast2
(
scope
.
row
.
durationInMillis
)
:
'-'
}}
</
template
>
</
template
>
...
@@ -167,7 +167,7 @@ import { CategoryApi } from '@/api/bpm/category'
...
@@ -167,7 +167,7 @@ import { CategoryApi } from '@/api/bpm/category'
import
*
as
UserApi
from
'@/api/system/user'
import
*
as
UserApi
from
'@/api/system/user'
import
{
cancelProcessInstanceByAdmin
}
from
'@/api/bpm/processInstance'
import
{
cancelProcessInstanceByAdmin
}
from
'@/api/bpm/processInstance'
// 它
是
【我的流程】的差异是,该菜单可以看全部的流程实例
// 它
和
【我的流程】的差异是,该菜单可以看全部的流程实例
defineOptions
({
name
:
'BpmProcessInstanceManager'
})
defineOptions
({
name
:
'BpmProcessInstanceManager'
})
const
router
=
useRouter
()
// 路由
const
router
=
useRouter
()
// 路由
...
...
src/views/bpm/task/done/index.vue
View file @
48f66247
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"审批建议"
prop=
"reason"
min-width=
"180"
/>
<el-table-column
align=
"center"
label=
"审批建议"
prop=
"reason"
min-width=
"180"
/>
<el-table-column
align=
"center"
label=
"耗时"
prop=
"durationInMillis"
width=
"1
2
0"
>
<el-table-column
align=
"center"
label=
"耗时"
prop=
"durationInMillis"
width=
"1
6
0"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
{{
formatPast2
(
scope
.
row
.
durationInMillis
)
}}
{{
formatPast2
(
scope
.
row
.
durationInMillis
)
}}
</
template
>
</
template
>
...
@@ -127,7 +127,7 @@ const queryFormRef = ref() // 搜索的表单
...
@@ -127,7 +127,7 @@ const queryFormRef = ref() // 搜索的表单
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
TaskApi
.
get
DoneTask
Page
(
queryParams
)
const
data
=
await
TaskApi
.
get
TaskDone
Page
(
queryParams
)
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
...
src/views/bpm/task/manager/index.vue
0 → 100644
View file @
48f66247
<
template
>
<doc-alert
title=
"工作流手册"
url=
"https://doc.iocoder.cn/bpm/"
/>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
ref=
"queryFormRef"
:inline=
"true"
:model=
"queryParams"
class=
"-mb-15px"
label-width=
"68px"
>
<el-form-item
label=
"任务名称"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
class=
"!w-240px"
clearable
placeholder=
"请输入任务名称"
@
keyup
.
enter=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
<el-date-picker
v-model=
"queryParams.createTime"
:default-time=
"[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class=
"!w-240px"
end-placeholder=
"结束日期"
start-placeholder=
"开始日期"
type=
"daterange"
value-format=
"YYYY-MM-DD HH:mm:ss"
/>
</el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
>
<Icon
class=
"mr-5px"
icon=
"ep:search"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
>
<Icon
class=
"mr-5px"
icon=
"ep:refresh"
/>
重置
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
align=
"center"
label=
"流程"
prop=
"processInstance.name"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"发起人"
prop=
"processInstance.startUser.nickname"
width=
"100"
/>
<el-table-column
:formatter=
"dateFormatter"
align=
"center"
label=
"发起时间"
prop=
"createTime"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"当前任务"
prop=
"name"
width=
"180"
/>
<el-table-column
:formatter=
"dateFormatter"
align=
"center"
label=
"任务开始时间"
prop=
"createTime"
width=
"180"
/>
<el-table-column
:formatter=
"dateFormatter"
align=
"center"
label=
"任务结束时间"
prop=
"endTime"
width=
"180"
/>
<el-table-column
align=
"center"
label=
"审批人"
prop=
"assigneeUser.nickname"
width=
"100"
/>
<el-table-column
align=
"center"
label=
"审批状态"
prop=
"status"
width=
"120"
>
<template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.BPM_TASK_STATUS"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"审批建议"
prop=
"reason"
min-width=
"180"
/>
<el-table-column
align=
"center"
label=
"耗时"
prop=
"durationInMillis"
width=
"160"
>
<
template
#
default=
"scope"
>
{{
formatPast2
(
scope
.
row
.
durationInMillis
)
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"流程编号"
prop=
"id"
:show-overflow-tooltip=
"true"
/>
<el-table-column
align=
"center"
label=
"任务编号"
prop=
"id"
:show-overflow-tooltip=
"true"
/>
<el-table-column
align=
"center"
label=
"操作"
fixed=
"right"
width=
"80"
>
<
template
#
default=
"scope"
>
<el-button
link
type=
"primary"
@
click=
"handleAudit(scope.row)"
>
历史
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
v-model:limit=
"queryParams.pageSize"
v-model:page=
"queryParams.pageNo"
:total=
"total"
@
pagination=
"getList"
/>
</ContentWrap>
</template>
<
script
lang=
"ts"
setup
>
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
{
dateFormatter
,
formatPast2
}
from
'@/utils/formatTime'
import
*
as
TaskApi
from
'@/api/bpm/task'
// 它和【待办任务】【已办任务】的差异是,该菜单可以看全部的流程任务
defineOptions
({
name
:
'BpmManagerTask'
})
const
{
push
}
=
useRouter
()
// 路由
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
const
list
=
ref
([])
// 列表的数据
const
queryParams
=
reactive
({
pageNo
:
1
,
pageSize
:
10
,
name
:
''
,
createTime
:
[]
})
const
queryFormRef
=
ref
()
// 搜索的表单
/** 查询任务列表 */
const
getList
=
async
()
=>
{
loading
.
value
=
true
try
{
const
data
=
await
TaskApi
.
getTaskManagerPage
(
queryParams
)
list
.
value
=
data
.
list
total
.
value
=
data
.
total
}
finally
{
loading
.
value
=
false
}
}
/** 搜索按钮操作 */
const
handleQuery
=
()
=>
{
queryParams
.
pageNo
=
1
getList
()
}
/** 重置按钮操作 */
const
resetQuery
=
()
=>
{
queryFormRef
.
value
.
resetFields
()
handleQuery
()
}
/** 处理审批按钮 */
const
handleAudit
=
(
row
:
any
)
=>
{
push
({
name
:
'BpmProcessInstanceDetail'
,
query
:
{
id
:
row
.
processInstance
.
id
}
})
}
/** 初始化 **/
onMounted
(()
=>
{
getList
()
})
</
script
>
src/views/bpm/task/todo/index.vue
View file @
48f66247
...
@@ -109,7 +109,7 @@ const queryFormRef = ref() // 搜索的表单
...
@@ -109,7 +109,7 @@ const queryFormRef = ref() // 搜索的表单
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
data
=
await
TaskApi
.
getT
odoTask
Page
(
queryParams
)
const
data
=
await
TaskApi
.
getT
askTodo
Page
(
queryParams
)
list
.
value
=
data
.
list
list
.
value
=
data
.
list
total
.
value
=
data
.
total
total
.
value
=
data
.
total
}
finally
{
}
finally
{
...
...
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