From 2267517fd87e196716721dc92327e3617a83e8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com> Date: Thu, 30 Jul 2026 21:07:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=9D=E6=8C=81=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E5=88=86=E7=B1=BB=E7=AD=9B=E9=80=89=E4=B8=8E=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 合并分类与搜索条件,避免筛选状态相互覆盖 - 保存工作流后按当前条件刷新并同步左侧选中状态 --- .../src/views/ai/workflow/WorkflowList.vue | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) 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) {