提交 | 用户 | 时间
|
39248b
|
1 |
<!-- 工作流 - 抄送我的流程 --> |
H |
2 |
<template> |
820397
|
3 |
<ContentWrap> |
H |
4 |
<!-- 搜索工作栏 --> |
|
5 |
<el-form ref="queryFormRef" :inline="true" class="-mb-15px" label-width="68px"> |
|
6 |
<el-form-item label="流程名称" prop="name"> |
|
7 |
<el-input |
|
8 |
v-model="queryParams.processInstanceName" |
|
9 |
class="!w-240px" |
|
10 |
clearable |
|
11 |
placeholder="请输入流程名称" |
|
12 |
/> |
|
13 |
</el-form-item> |
|
14 |
<el-form-item label="抄送时间" prop="createTime"> |
|
15 |
<el-date-picker |
|
16 |
v-model="queryParams.createTime" |
|
17 |
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
|
18 |
class="!w-240px" |
|
19 |
end-placeholder="结束日期" |
|
20 |
start-placeholder="开始日期" |
|
21 |
type="daterange" |
|
22 |
value-format="YYYY-MM-DD HH:mm:ss" |
|
23 |
/> |
|
24 |
</el-form-item> |
|
25 |
<el-form-item> |
|
26 |
<el-button @click="handleQuery"> |
|
27 |
<Icon class="mr-5px" icon="ep:search" /> |
|
28 |
搜索 |
|
29 |
</el-button> |
|
30 |
<el-button @click="resetQuery"> |
|
31 |
<Icon class="mr-5px" icon="ep:refresh" /> |
|
32 |
重置 |
|
33 |
</el-button> |
|
34 |
</el-form-item> |
|
35 |
</el-form> |
|
36 |
</ContentWrap> |
|
37 |
|
|
38 |
<!-- 列表 --> |
|
39 |
<ContentWrap> |
|
40 |
<el-table v-loading="loading" :data="list"> |
|
41 |
<el-table-column align="center" label="流程名" prop="processInstanceName" min-width="180" /> |
|
42 |
<el-table-column align="center" label="流程发起人" prop="startUserName" min-width="100" /> |
|
43 |
<el-table-column |
|
44 |
:formatter="dateFormatter" |
|
45 |
align="center" |
|
46 |
label="流程发起时间" |
|
47 |
prop="processInstanceStartTime" |
|
48 |
width="180" |
|
49 |
/> |
|
50 |
<el-table-column align="center" label="抄送任务" prop="taskName" min-width="180" /> |
|
51 |
<el-table-column align="center" label="抄送人" prop="creatorName" min-width="100" /> |
|
52 |
<el-table-column |
|
53 |
align="center" |
|
54 |
label="抄送时间" |
|
55 |
prop="createTime" |
|
56 |
width="180" |
|
57 |
:formatter="dateFormatter" |
|
58 |
/> |
|
59 |
<el-table-column align="center" label="操作" fixed="right" width="80"> |
|
60 |
<template #default="scope"> |
|
61 |
<el-button link type="primary" @click="handleAudit(scope.row)">详情</el-button> |
|
62 |
</template> |
|
63 |
</el-table-column> |
|
64 |
</el-table> |
|
65 |
<!-- 分页 --> |
|
66 |
<Pagination |
|
67 |
v-model:limit="queryParams.pageSize" |
|
68 |
v-model:page="queryParams.pageNo" |
|
69 |
:total="total" |
|
70 |
@pagination="getList" |
|
71 |
/> |
|
72 |
</ContentWrap> |
|
73 |
</template> |
|
74 |
<script lang="ts" setup> |
|
75 |
import { dateFormatter } from '@/utils/formatTime' |
|
76 |
import * as ProcessInstanceApi from '@/api/bpm/processInstance' |
|
77 |
|
|
78 |
defineOptions({ name: 'BpmProcessInstanceCopy' }) |
|
79 |
|
|
80 |
const { push } = useRouter() // 路由 |
|
81 |
|
|
82 |
const loading = ref(false) // 列表的加载中 |
|
83 |
const total = ref(0) // 列表的总页数 |
|
84 |
const list = ref([]) // 列表的数据 |
|
85 |
const queryParams = reactive({ |
|
86 |
pageNo: 1, |
|
87 |
pageSize: 10, |
|
88 |
processInstanceId: '', |
|
89 |
processInstanceName: '', |
|
90 |
createTime: [] |
|
91 |
}) |
|
92 |
const queryFormRef = ref() // 搜索的表单 |
|
93 |
|
|
94 |
/** 查询任务列表 */ |
|
95 |
const getList = async () => { |
|
96 |
loading.value = true |
|
97 |
try { |
|
98 |
const data = await ProcessInstanceApi.getProcessInstanceCopyPage(queryParams) |
|
99 |
list.value = data.list |
|
100 |
total.value = data.total |
|
101 |
} finally { |
|
102 |
loading.value = false |
|
103 |
} |
|
104 |
} |
|
105 |
|
|
106 |
/** 处理审批按钮 */ |
|
107 |
const handleAudit = (row: any) => { |
|
108 |
push({ |
|
109 |
name: 'BpmProcessInstanceDetail', |
|
110 |
query: { |
|
111 |
id: row.processInstanceId |
|
112 |
} |
|
113 |
}) |
|
114 |
} |
|
115 |
|
|
116 |
/** 搜索按钮操作 */ |
|
117 |
const handleQuery = () => { |
|
118 |
queryParams.pageNo = 1 |
|
119 |
getList() |
|
120 |
} |
|
121 |
|
|
122 |
/** 重置按钮操作 */ |
|
123 |
const resetQuery = () => { |
|
124 |
queryFormRef.value.resetFields() |
|
125 |
handleQuery() |
|
126 |
} |
|
127 |
|
|
128 |
/** 初始化 **/ |
|
129 |
onMounted(() => { |
|
130 |
getList() |
|
131 |
}) |
|
132 |
</script> |