From be06c06f43134a5cb3335175966ee21056bd886a Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Wed, 17 Sep 2025 16:00:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=AF=E6=8C=81=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E6=9F=A5=E6=89=BE-=E5=A7=93=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../institutionalStructure/donationRecord.vue | 7 ++++++- .../mixins/data-manager.js | 20 ++++++++++++++----- .../mixins/donation-mixin.js | 12 +++++++---- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/pages/institutionalStructure/donationRecord.vue b/pages/institutionalStructure/donationRecord.vue index 7ec4dd8..017eb82 100644 --- a/pages/institutionalStructure/donationRecord.vue +++ b/pages/institutionalStructure/donationRecord.vue @@ -9,7 +9,7 @@ :width="'100%'" btn-text="搜索" placeholder="请输入搜索关键词" - @search="onSearch" + @search="onSearch()" /> { console.log("捐款记录加载成功:", data.length, "条"); }, @@ -137,14 +137,18 @@ export const donationMixin = { * @param {string} val 搜索关键词 */ async onSearch(val) { + console.log("@@@@@@@@@@val", val); this.searchKeyword = val; + + console.log("@@@@@@@@@@", this.searchKeyword); + await this.searchData( - { ...this.getBaseParams(), realName: val }, + { ...this.getBaseParams(), realName: val.trim() }, { apiCall: getDonorList, dataTransformer: this.transformDonationData, dataPath: "data.list.rows", - totalPath: "data.total", + totalPath: "data.list.total", onSuccess: (data, response) => { console.log("搜索完成,找到:", data.length, "条记录"); }, @@ -167,7 +171,7 @@ export const donationMixin = { dataTransformer: this.transformDonationData, params: currentParams, dataPath: "data.list.rows", - totalPath: "data.total", + totalPath: "data.list.total", onSuccess: (data, response) => { console.log("加载更多完成,新增:", data.length, "条记录"); },