19
19
class =" !w-240px"
20
20
/>
21
21
</el-form-item >
22
-
22
+
23
23
<el-form-item >
24
24
<el-button @click =" handleQuery" ><Icon icon =" ep:search" class =" mr-5px" /> 搜索</el-button >
25
- <el-button @click =" resetQuery" ><Icon icon =" ep:refresh" class =" mr-5px" /> 重置</el-button >
26
- <el-button
27
- type =" primary"
28
- plain
29
- v-hasPermi =" ['bpm:process-instance:query']"
30
- @click =" handleCreate(undefined)"
31
- >
32
- <Icon icon =" ep:plus" class =" mr-5px" /> 发起流程
33
- </el-button >
34
25
</el-form-item >
35
26
27
+ <!-- TODO @ tuituji:style 可以使用 unocss -->
36
28
<el-form-item label =" " prop =" category" :style =" { position: 'absolute', right: '130px' }" >
37
- <el-select
38
- v-model =" queryParams.category"
39
- placeholder =" 请选择流程分类"
40
- clearable
41
- class =" !w-240px"
42
- >
43
- <el-option
44
- v-for =" category in categoryList"
45
- :key =" category.code"
46
- :label =" category.name"
47
- :value =" category.code"
48
- />
49
- </el-select >
29
+ <!-- TODO @tuituji:应该选择好分类,就触发搜索啦。 -->
30
+ <el-select
31
+ v-model =" queryParams.category"
32
+ placeholder =" 请选择流程分类"
33
+ clearable
34
+ class =" !w-155px"
35
+ >
36
+ <el-option
37
+ v-for =" category in categoryList"
38
+ :key =" category.code"
39
+ :label =" category.name"
40
+ :value =" category.code"
41
+ />
42
+ </el-select >
50
43
</el-form-item >
51
44
45
+ <!-- 高级筛选 -->
46
+ <!-- TODO @ tuituji:style 可以使用 unocss -->
52
47
<el-form-item :style =" { position: 'absolute', right: '0px' }" >
53
- <el-button v-popover =" popoverRef" v-click-outside =" onClickOutside" :icon =" List" >
54
- 高级筛选
55
- </el-button >
56
-
57
- <el-popover
58
- ref =" popoverRef"
59
- trigger =" click"
60
- virtual-triggering
61
- persistent
62
- :width =" 400"
63
- :show-arrow =" false"
64
- placement =" bottom-end"
65
- >
66
- <el-form-item label =" 流程发起人" class =" bold-label" label-position =" top" prop =" category" >
67
- <el-select
68
- v-model =" queryParams.category"
69
- placeholder =" 请选择流程发起人"
70
- clearable
71
- class =" !w-390px"
48
+ <el-button v-popover =" popoverRef" v-click-outside =" onClickOutside" :icon =" List" >
49
+ 高级筛选
50
+ </el-button >
51
+ <el-popover
52
+ ref =" popoverRef"
53
+ trigger =" click"
54
+ virtual-triggering
55
+ persistent
56
+ :width =" 400"
57
+ :show-arrow =" false"
58
+ placement =" bottom-end"
59
+ >
60
+ <el-form-item label =" 流程发起人" class =" bold-label" label-position =" top" prop =" category" >
61
+ <el-select
62
+ v-model =" queryParams.category"
63
+ placeholder =" 请选择流程发起人"
64
+ clearable
65
+ class =" !w-390px"
66
+ >
67
+ <el-option
68
+ v-for =" category in categoryList"
69
+ :key =" category.code"
70
+ :label =" category.name"
71
+ :value =" category.code"
72
+ />
73
+ </el-select >
74
+ </el-form-item >
75
+ <el-form-item
76
+ label =" 所属流程"
77
+ class =" bold-label"
78
+ label-position =" top"
79
+ prop =" processDefinitionKey"
72
80
>
73
- <el-option
74
- v-for =" category in categoryList"
75
- :key =" category.code"
76
- :label =" category.name"
77
- :value =" category.code"
81
+ <el-input
82
+ v-model =" queryParams.processDefinitionKey"
83
+ placeholder =" 请输入流程定义的标识"
84
+ clearable
85
+ @keyup.enter =" handleQuery"
86
+ class =" !w-390px"
78
87
/>
79
- </el-select >
80
- </el-form-item >
81
- <el-form-item label =" 所属流程" class =" bold-label" label-position =" top" prop =" processDefinitionKey" >
82
- <el-input
83
- v-model =" queryParams.processDefinitionKey"
84
- placeholder =" 请输入流程定义的标识"
85
- clearable
86
- @keyup.enter =" handleQuery"
87
- class =" !w-390px"
88
- />
89
- </el-form-item >
90
-
91
- <el-form-item label =" 流程状态" class =" bold-label" label-position =" top" prop =" status" >
92
- <el-select
93
- v-model =" queryParams.status"
94
- placeholder =" 请选择流程状态"
95
- clearable
96
- class =" !w-390px"
97
- >
98
- <el-option
99
- v-for =" dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)"
100
- :key =" dict.value"
101
- :label =" dict.label"
102
- :value =" dict.value"
88
+ </el-form-item >
89
+ <el-form-item label =" 流程状态" class =" bold-label" label-position =" top" prop =" status" >
90
+ <el-select
91
+ v-model =" queryParams.status"
92
+ placeholder =" 请选择流程状态"
93
+ clearable
94
+ class =" !w-390px"
95
+ >
96
+ <el-option
97
+ v-for =" dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)"
98
+ :key =" dict.value"
99
+ :label =" dict.label"
100
+ :value =" dict.value"
101
+ />
102
+ </el-select >
103
+ </el-form-item >
104
+ <el-form-item label =" 发起时间" class =" bold-label" label-position =" top" prop =" createTime" >
105
+ <el-date-picker
106
+ v-model =" queryParams.createTime"
107
+ value-format =" YYYY-MM-DD HH:mm:ss"
108
+ type =" daterange"
109
+ start-placeholder =" 开始日期"
110
+ end-placeholder =" 结束日期"
111
+ :default-time =" [new Date('1 00:00:00'), new Date('1 23:59:59')]"
112
+ class =" !w-240px"
103
113
/>
104
- </el-select >
105
- </el-form-item >
106
- <el-form-item label =" 发起时间" class =" bold-label" label-position =" top" prop =" createTime" >
107
- <el-date-picker
108
- v-model =" queryParams.createTime"
109
- value-format =" YYYY-MM-DD HH:mm:ss"
110
- type =" daterange"
111
- start-placeholder =" 开始日期"
112
- end-placeholder =" 结束日期"
113
- :default-time =" [new Date('1 00:00:00'), new Date('1 23:59:59')]"
114
- class =" !w-240px"
115
- />
116
- </el-form-item >
117
- </el-popover >
114
+ </el-form-item >
115
+ </el-popover >
116
+ <!-- TODO @tuituji:这里应该有确认,和取消、清空搜索条件,三个按钮。 -->
118
117
</el-form-item >
119
-
120
118
</el-form >
121
119
</ContentWrap >
122
120
131
129
min-width =" 100"
132
130
fixed =" left"
133
131
/>
132
+ <!-- TODO @芋艿:摘要 -->
133
+ <!-- TODO @tuituji:流程状态。可见需求文档里 -->
134
134
<el-table-column label =" 流程状态" prop =" status" width =" 120" >
135
135
<template #default =" scope " >
136
136
<dict-tag :type =" DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS" :value =" scope.row.status" />
162
162
</el-button>
163
163
</template>
164
164
</el-table-column>
165
- <el-table-column label="流程编号" align="center" prop="id" min-width="320px" /> -->
165
+ -->
166
166
<el-table-column label =" 操作" align =" center" fixed =" right" width =" 180" >
167
167
<template #default =" scope " >
168
168
<el-button
198
198
</ContentWrap >
199
199
</template >
200
200
<script lang="ts" setup>
201
- import { Delete , Edit , Search , Share , Upload , List } from ' @element-plus/icons-vue'
201
+ // TODO @tuituji:List 改成 <Icon icon="ep:plus" class="mr-5px" /> 类似这种组件哈。
202
+ import { List } from ' @element-plus/icons-vue'
202
203
import { DICT_TYPE , getIntDictOptions } from ' @/utils/dict'
203
- import { dateFormatter , formatPast2 } from ' @/utils/formatTime'
204
+ import { dateFormatter } from ' @/utils/formatTime'
204
205
import { ElMessageBox } from ' element-plus'
205
206
import * as ProcessInstanceApi from ' @/api/bpm/processInstance'
206
- import { CategoryApi } from ' @/api/bpm/category'
207
+ import { CategoryApi , CategoryVO } from ' @/api/bpm/category'
207
208
import { ProcessInstanceVO } from ' @/api/bpm/processInstance'
208
209
import * as DefinitionApi from ' @/api/bpm/definition'
209
210
@@ -226,7 +227,7 @@ const queryParams = reactive({
226
227
createTime: []
227
228
})
228
229
const queryFormRef = ref () // 搜索的表单
229
- const categoryList = ref ([]) // 流程分类列表
230
+ const categoryList = ref < CategoryVO []> ([]) // 流程分类列表
230
231
231
232
/** 查询列表 */
232
233
const getList = async () => {
@@ -297,6 +298,15 @@ const handleCancel = async (row) => {
297
298
await getList ()
298
299
}
299
300
301
+ // TODO @tuituji:这个 import 是不是没用哈?
302
+ import { ClickOutside as vClickOutside } from ' element-plus'
303
+
304
+ // TODO @tuituji:onClickAdvancedSearch。方法名叫这个,会更好一些哇?打开高级搜索。
305
+ const popoverRef = ref ()
306
+ const onClickOutside = () => {
307
+ unref (popoverRef ).popperRef ?.delayHide ?.()
308
+ }
309
+
300
310
/** 激活时 **/
301
311
onActivated (() => {
302
312
getList ()
@@ -307,17 +317,9 @@ onMounted(async () => {
307
317
await getList ()
308
318
categoryList .value = await CategoryApi .getCategorySimpleList ()
309
319
})
310
-
311
- import { ref , unref } from ' vue'
312
- import { ClickOutside as vClickOutside } from ' element-plus'
313
-
314
- const popoverRef = ref ()
315
- const onClickOutside = () => {
316
- unref (popoverRef ).popperRef ?.delayHide ?.()
317
- }
318
320
</script >
319
321
<style >
320
322
.bold-label .el-form-item__label {
321
323
font-weight : bold ; /* 将字体加粗 */
322
324
}
323
- </style >
325
+ </style >
0 commit comments