【代码评审】工作流:新发起页的优化
parent
5814826fa8
commit
0fae9a4ba4
|
@ -6,8 +6,8 @@
|
||||||
class="!w-50% mb-15px"
|
class="!w-50% mb-15px"
|
||||||
placeholder="请输入流程名称"
|
placeholder="请输入流程名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@input="handleQuery"
|
||||||
@clear="handleClear"
|
@clear="handleQuery"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<Icon icon="ep:search" />
|
<Icon icon="ep:search" />
|
||||||
|
@ -152,8 +152,8 @@ const getDefinitionList = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 搜索流程 */
|
||||||
const filteredProcessDefinitionList = ref([]) // 用于存储搜索过滤后的流程定义
|
const filteredProcessDefinitionList = ref([]) // 用于存储搜索过滤后的流程定义
|
||||||
// 直接进行前端搜索
|
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
if (currentSearchKey.value.trim()) {
|
if (currentSearchKey.value.trim()) {
|
||||||
// 如果有搜索关键字,进行过滤
|
// 如果有搜索关键字,进行过滤
|
||||||
|
@ -167,11 +167,6 @@ const handleQuery = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听input `clearable` 事件
|
|
||||||
const handleClear = () => {
|
|
||||||
filteredProcessDefinitionList.value = processDefinitionList.value
|
|
||||||
}
|
|
||||||
|
|
||||||
// 流程定义的分组
|
// 流程定义的分组
|
||||||
const processDefinitionGroup: any = computed(() => {
|
const processDefinitionGroup: any = computed(() => {
|
||||||
if (!processDefinitionList.value?.length) return {}
|
if (!processDefinitionList.value?.length) return {}
|
||||||
|
|
Loading…
Reference in New Issue