From c0429590463405f3b15c60243f2e7f55c8b6187f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Fri, 24 Nov 2023 15:47:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E8=BF=87=E6=BB=A4=20=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 2173cf19e..74520642f 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -170,6 +170,8 @@ const opensearchTable = ( const _searchCondition = {} // 判断查询条件中,是否存在指向主表的数据 if (searchCondition && searchCondition.length > 0) { + // 转换筛选条件所需 + let filters:any[] = [] searchCondition.forEach((item) => { // 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 if (item.isMainValue) { @@ -181,9 +183,22 @@ const opensearchTable = ( ? row[item.value] : '' } else { - _searchCondition[item.key] = item.value + // 扩展 转换为筛选条件进行查询 + if (item.isSearch) { + filters.push({ + action: item.action, + column: item.key, + value: item.value + }) + } else { + _searchCondition[item.key] = item.value + } } }) + if (filters.length > 0) { + _searchCondition.isSearch = true + _searchCondition.filters = filters + } } const _searchTableTitle = searchTitle const _searchTableAllSchemas = searchAllSchemas