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
4ba5dad2
authored
Nov 09, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审】工作流:我发起的审批列表
parent
91b1ecd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
101 deletions
+102
-101
src/views/bpm/processInstance/index.vue
+102
-101
No files found.
src/views/bpm/processInstance/index.vue
View file @
4ba5dad2
...
@@ -19,104 +19,102 @@
...
@@ -19,104 +19,102 @@
class=
"!w-240px"
class=
"!w-240px"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
type=
"primary"
plain
v-hasPermi=
"['bpm:process-instance:query']"
@
click=
"handleCreate(undefined)"
>
<Icon
icon=
"ep:plus"
class=
"mr-5px"
/>
发起流程
</el-button>
</el-form-item>
</el-form-item>
<!-- TODO @ tuituji:style 可以使用 unocss -->
<el-form-item
label=
""
prop=
"category"
:style=
"
{ position: 'absolute', right: '130px' }">
<el-form-item
label=
""
prop=
"category"
:style=
"
{ position: 'absolute', right: '130px' }">
<el-select
<!-- TODO @tuituji:应该选择好分类,就触发搜索啦。 -->
v-model=
"queryParams.category"
<el-select
placeholder=
"请选择流程分类"
v-model=
"queryParams.category"
clearable
placeholder=
"请选择流程分类"
class=
"!w-240px"
clearable
>
class=
"!w-155px"
<el-option
>
v-for=
"category in categoryList"
<el-option
:key=
"category.code"
v-for=
"category in categoryList"
:label=
"category.name"
:key=
"category.code"
:value=
"category.code"
:label=
"category.name"
/>
:value=
"category.code"
</el-select>
/>
</el-select>
</el-form-item>
</el-form-item>
<!-- 高级筛选 -->
<!-- TODO @ tuituji:style 可以使用 unocss -->
<el-form-item
:style=
"
{ position: 'absolute', right: '0px' }">
<el-form-item
:style=
"
{ position: 'absolute', right: '0px' }">
<el-button
v-popover=
"popoverRef"
v-click-outside=
"onClickOutside"
:icon=
"List"
>
<el-button
v-popover=
"popoverRef"
v-click-outside=
"onClickOutside"
:icon=
"List"
>
高级筛选
高级筛选
</el-button>
</el-button>
<el-popover
<el-popover
ref=
"popoverRef"
ref=
"popoverRef"
trigger=
"click"
trigger=
"click"
virtual-triggering
virtual-triggering
persistent
persistent
:width=
"400"
:width=
"400"
:show-arrow=
"false"
:show-arrow=
"false"
placement=
"bottom-end"
placement=
"bottom-end"
>
>
<el-form-item
label=
"流程发起人"
class=
"bold-label"
label-position=
"top"
prop=
"category"
>
<el-form-item
label=
"流程发起人"
class=
"bold-label"
label-position=
"top"
prop=
"category"
>
<el-select
<el-select
v-model=
"queryParams.category"
v-model=
"queryParams.category"
placeholder=
"请选择流程发起人"
placeholder=
"请选择流程发起人"
clearable
clearable
class=
"!w-390px"
class=
"!w-390px"
>
<el-option
v-for=
"category in categoryList"
:key=
"category.code"
:label=
"category.name"
:value=
"category.code"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"所属流程"
class=
"bold-label"
label-position=
"top"
prop=
"processDefinitionKey"
>
>
<el-option
<el-input
v-for=
"category in categoryList"
v-model=
"queryParams.processDefinitionKey"
:key=
"category.code"
placeholder=
"请输入流程定义的标识"
:label=
"category.name"
clearable
:value=
"category.code"
@
keyup
.
enter=
"handleQuery"
class=
"!w-390px"
/>
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"流程状态"
class=
"bold-label"
label-position=
"top"
prop=
"status"
>
<el-form-item
label=
"所属流程"
class=
"bold-label"
label-position=
"top"
prop=
"processDefinitionKey"
>
<el-select
<el-input
v-model=
"queryParams.status"
v-model=
"queryParams.processDefinitionKey"
placeholder=
"请选择流程状态"
placeholder=
"请输入流程定义的标识"
clearable
clearable
class=
"!w-390px"
@
keyup
.
enter=
"handleQuery"
>
class=
"!w-390px"
<el-option
/>
v-for=
"dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)"
</el-form-item>
:key=
"dict.value"
:label=
"dict.label"
<el-form-item
label=
"流程状态"
class=
"bold-label"
label-position=
"top"
prop=
"status"
>
:value=
"dict.value"
<el-select
/>
v-model=
"queryParams.status"
</el-select>
placeholder=
"请选择流程状态"
</el-form-item>
clearable
<el-form-item
label=
"发起时间"
class=
"bold-label"
label-position=
"top"
prop=
"createTime"
>
class=
"!w-390px"
<el-date-picker
>
v-model=
"queryParams.createTime"
<el-option
value-format=
"YYYY-MM-DD HH:mm:ss"
v-for=
"dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)"
type=
"daterange"
:key=
"dict.value"
start-placeholder=
"开始日期"
:label=
"dict.label"
end-placeholder=
"结束日期"
:value=
"dict.value"
:default-time=
"[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class=
"!w-240px"
/>
/>
</el-select>
</el-form-item>
</el-form-item>
</el-popover>
<el-form-item
label=
"发起时间"
class=
"bold-label"
label-position=
"top"
prop=
"createTime"
>
<!-- TODO @tuituji:这里应该有确认,和取消、清空搜索条件,三个按钮。 -->
<el-date-picker
v-model=
"queryParams.createTime"
value-format=
"YYYY-MM-DD HH:mm:ss"
type=
"daterange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class=
"!w-240px"
/>
</el-form-item>
</el-popover>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</ContentWrap>
</ContentWrap>
...
@@ -131,6 +129,8 @@
...
@@ -131,6 +129,8 @@
min-width=
"100"
min-width=
"100"
fixed=
"left"
fixed=
"left"
/>
/>
<!-- TODO @芋艿:摘要 -->
<!-- TODO @tuituji:流程状态。可见需求文档里 -->
<el-table-column
label=
"流程状态"
prop=
"status"
width=
"120"
>
<el-table-column
label=
"流程状态"
prop=
"status"
width=
"120"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS"
:value=
"scope.row.status"
/>
<dict-tag
:type=
"DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS"
:value=
"scope.row.status"
/>
...
@@ -162,7 +162,7 @@
...
@@ -162,7 +162,7 @@
</el-button>
</el-button>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="流程编号" align="center" prop="id" min-width="320px" />
-->
-->
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"180"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"180"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
...
@@ -198,12 +198,13 @@
...
@@ -198,12 +198,13 @@
</ContentWrap>
</ContentWrap>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
Delete
,
Edit
,
Search
,
Share
,
Upload
,
List
}
from
'@element-plus/icons-vue'
// TODO @tuituji:List 改成
<
Icon
icon
=
"ep:plus"
class
=
"mr-5px"
/>
类似这种组件哈。
import
{
List
}
from
'@element-plus/icons-vue'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getIntDictOptions
}
from
'@/utils/dict'
import
{
dateFormatter
,
formatPast2
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
ElMessageBox
}
from
'element-plus'
import
{
ElMessageBox
}
from
'element-plus'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
*
as
ProcessInstanceApi
from
'@/api/bpm/processInstance'
import
{
CategoryApi
}
from
'@/api/bpm/category'
import
{
CategoryApi
,
CategoryVO
}
from
'@/api/bpm/category'
import
{
ProcessInstanceVO
}
from
'@/api/bpm/processInstance'
import
{
ProcessInstanceVO
}
from
'@/api/bpm/processInstance'
import
*
as
DefinitionApi
from
'@/api/bpm/definition'
import
*
as
DefinitionApi
from
'@/api/bpm/definition'
...
@@ -226,7 +227,7 @@ const queryParams = reactive({
...
@@ -226,7 +227,7 @@ const queryParams = reactive({
createTime
:
[]
createTime
:
[]
})
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
queryFormRef
=
ref
()
// 搜索的表单
const
categoryList
=
ref
([])
// 流程分类列表
const
categoryList
=
ref
<
CategoryVO
[]
>
([])
// 流程分类列表
/** 查询列表 */
/** 查询列表 */
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
...
@@ -297,6 +298,15 @@ const handleCancel = async (row) => {
...
@@ -297,6 +298,15 @@ const handleCancel = async (row) => {
await
getList
()
await
getList
()
}
}
// TODO @tuituji:这个 import 是不是没用哈?
import
{
ClickOutside
as
vClickOutside
}
from
'element-plus'
// TODO @tuituji:onClickAdvancedSearch。方法名叫这个,会更好一些哇?打开高级搜索。
const
popoverRef
=
ref
()
const
onClickOutside
=
()
=>
{
unref
(
popoverRef
).
popperRef
?.
delayHide
?.()
}
/** 激活时 **/
/** 激活时 **/
onActivated
(()
=>
{
onActivated
(()
=>
{
getList
()
getList
()
...
@@ -307,17 +317,9 @@ onMounted(async () => {
...
@@ -307,17 +317,9 @@ onMounted(async () => {
await
getList
()
await
getList
()
categoryList
.
value
=
await
CategoryApi
.
getCategorySimpleList
()
categoryList
.
value
=
await
CategoryApi
.
getCategorySimpleList
()
})
})
import
{
ref
,
unref
}
from
'vue'
import
{
ClickOutside
as
vClickOutside
}
from
'element-plus'
const
popoverRef
=
ref
()
const
onClickOutside
=
()
=>
{
unref
(
popoverRef
).
popperRef
?.
delayHide
?.()
}
</
script
>
</
script
>
<
style
>
<
style
>
.bold-label
.el-form-item__label
{
.bold-label
.el-form-item__label
{
font-weight
:
bold
;
/* 将字体加粗 */
font-weight
:
bold
;
/* 将字体加粗 */
}
}
</
style
>
</
style
>
\ No newline at end of file
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