yyb
10 小时以前 4ab0be7d4441f378add1f242b168d80fb27e65fe
src/views/officeProcessAutomation/ApproveManage/approve-shared/useApprovalInstanceModule.js
@@ -29,6 +29,10 @@
} from "../approve-template/selectOptionSource.js";
import { enrichInstanceRowFromFormConfig } from "./approvalInstanceFormConfigTable.js";
import {
  filterInstanceRowsByModuleSearch,
  hasActiveModuleSearch,
} from "./approvalInstanceListSearch.js";
import {
  getApprovalModuleConfig,
  getModuleListBusinessType,
  resolveModuleBusinessType,
@@ -57,11 +61,13 @@
  const moduleConfig = computed(() => getApprovalModuleConfig(moduleKey));
  const businessTypeOptions = ref([]);
  /** 与审批列表一致:优先用 TypeEnums 的 value,匹配不到再回退 approvalType */
  /** 列表查询 businessType:优先 registry 写死枚举,再回退 TypeEnums */
  const defaultListBusinessType = computed(() => {
    const fixed = getModuleListBusinessType(moduleKey);
    if (fixed != null && fixed !== "") return fixed;
    const resolved = resolveModuleBusinessType(moduleKey, businessTypeOptions.value);
    if (resolved != null && resolved !== "") return resolved;
    return getModuleListBusinessType(moduleKey);
    return "";
  });
  async function loadBusinessTypeOptions() {
@@ -144,8 +150,14 @@
      const caches = await fetchSelectOptionCaches(
        collectOptionSourcesFromFields(allFields)
      );
      tableData.value = mapped.map((row) => mapListRow(row, caches));
      page.total = total;
      let rows = mapped.map((row) => mapListRow(row, caches));
      if (hasActiveModuleSearch(moduleKey, searchForm)) {
        rows = filterInstanceRowsByModuleSearch(moduleKey, rows, searchForm);
      }
      tableData.value = rows;
      page.total = hasActiveModuleSearch(moduleKey, searchForm)
        ? rows.length
        : total;
    } catch {
      tableData.value = [];
      page.total = 0;