From 85f7484c5718a7c1e22e6753faa0d2d01b295e00 Mon Sep 17 00:00:00 2001 From: mll Date: Wed, 18 Mar 2026 18:41:47 +0800 Subject: [PATCH] =?UTF-8?q?search=E9=A1=B9=E9=BB=98=E8=AE=A4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA4=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LowDesign/src/LowReport/index.vue | 21 +++++++++++++++++++ src/plugins/avue/index.ts | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/components/LowDesign/src/LowReport/index.vue b/src/components/LowDesign/src/LowReport/index.vue index a0224bd..87629fd 100644 --- a/src/components/LowDesign/src/LowReport/index.vue +++ b/src/components/LowDesign/src/LowReport/index.vue @@ -231,6 +231,22 @@ const summaryMethod1=({columns,data})=>{ }) return styleObj } + + // 远程搜索处理函数 + async function handleRemoteSearch(code,prop,page,dictData) { + // 空关键词时可选择加载前10条或清空 + try { + let res = await ReportApi.getTableList(code,{pageSize: 50, pageNo:page}) + // 更新下拉选项 + dictData= dictData.concat(res.records.map(item=>({ + label:item[prop], + value:item[prop] + }))) + page++ + } finally { + + } + } function getCurrentDate() { const now = new Date(); // 补零函数:小于10则前面加0 @@ -383,6 +399,11 @@ const initTable = async () => { pageSize: 1000000, pageNo:1 } + // config.dicData=[] + // config.remote=true + // config.popperAppendToBody= true + // let pageN=1 + // config.remoteMethod= handleRemoteSearch(jkTableDicFields[item.fieldName],config.prop,pageN,config.dicData) config.dicFormatter= (res) => { //请求数据格式化 const arr=[...new Set(res.records.map(item=>item[config.prop=="zonename"?"salezonename":config.prop]))] return arr.map(item=>({label:item,value:item})) diff --git a/src/plugins/avue/index.ts b/src/plugins/avue/index.ts index a597e04..74e2d9b 100644 --- a/src/plugins/avue/index.ts +++ b/src/plugins/avue/index.ts @@ -26,7 +26,7 @@ export const setupAvue = async (app: App) => { searchSpan: 6, searchMenuSpan: 6, searchMenuPosition: 'left', - searchIndex: 3, + searchIndex: 4, searchIcon: true, searchShowBtn: true, labelSuffix: ' ',