From 552ec6b7d8ccc56c379da195fc6c9c74312b1070 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 22 五月 2026 17:57:46 +0800
Subject: [PATCH] OA部分查询条件变更

---
 src/pages/oa/_components/ApprovalInstanceListPage.vue |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/pages/oa/_components/ApprovalInstanceListPage.vue b/src/pages/oa/_components/ApprovalInstanceListPage.vue
index 86b102f..02b1f37 100644
--- a/src/pages/oa/_components/ApprovalInstanceListPage.vue
+++ b/src/pages/oa/_components/ApprovalInstanceListPage.vue
@@ -128,6 +128,7 @@
     filterRowsByModuleBusinessType,
     formatDateRangeLabel,
     getModuleSearchMeta,
+    hasActiveModuleSearch,
   } from "../_utils/approvalModuleListSearch.js";
   import {
     buildInstanceListParams,
@@ -235,14 +236,22 @@
       const res = await listApprovalInstancePage(buildListRequestParams());
       const { records, total } = unwrapInstancePage(res);
       const listFields = moduleConfig.value?.listFields || [];
-      const mapped = records.map(row => mapInstanceListRow(row, listFields));
+      let mapped = records.map(row => mapInstanceListRow(row, listFields));
+      if (hasActiveModuleSearch(props.moduleKey, searchForm)) {
+        mapped = filterRowsByModuleSearch(props.moduleKey, mapped, searchForm);
+      }
 
       if (page.current === 1) {
         list.value = mapped;
       } else {
         list.value = [...list.value, ...mapped];
       }
-      page.total = total;
+      const dropped = records.length - mapped.length;
+      page.total = hasActiveModuleSearch(props.moduleKey, searchForm)
+        ? list.value.length
+        : dropped > 0
+          ? Math.max(0, Number(total) - dropped)
+          : Number(total);
 
       if (list.value.length >= total || records.length < page.size) {
         pageStatus.value = "nomore";

--
Gitblit v1.9.3