diff --git a/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue b/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue index 2a17b65e..0fe4fbaf 100644 --- a/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue +++ b/easyflow-ui-admin/app/src/views/ai/workflow/WorkflowList.vue @@ -274,6 +274,8 @@ onMounted(() => { }); const pageDataRef = ref(); const saveDialog = ref(); +const selectedCategoryId = ref(''); +const searchKeyword = ref(''); const dictStore = useDictStore(); const headerButtons = [ { @@ -343,11 +345,18 @@ async function updateVisibilityScope( updatingScopeId.value = null; } } -const handleSearch = (params: string) => { - pageDataRef.value.setQuery({ title: params, isQueryOr: true }); -}; -function reset() { - pageDataRef.value.setQuery({}); +function applyFilters() { + pageDataRef.value?.setQuery({ + categoryId: selectedCategoryId.value || undefined, + title: searchKeyword.value || undefined, + }); +} +function handleSearch(keyword: string) { + searchKeyword.value = keyword; + applyFilters(); +} +function reloadCurrentList() { + pageDataRef.value?.reload?.(); } function showDialog(row: any, importMode = false) { saveDialog.value.openDialog({ ...row }, importMode); @@ -968,7 +977,8 @@ const formRules = computed(() => { }); function changeCategory(category: any) { - pageDataRef.value.setQuery({ categoryId: category.id }); + selectedCategoryId.value = category?.id ?? ''; + applyFilters(); } function showControlDialog(item: any) { formRef.value?.resetFields(); @@ -1046,7 +1056,7 @@ function handleHeaderButtonClick(data: any) {