From 1a97e90cf81b81bc730f51e26e93d1bb6bbacbf8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 29 Dec 2023 12:42:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E9=93=BE=E6=8E=A5=E8=BF=87=E6=BB=A4=E5=99=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=8C=B9=E9=85=8D=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/store/index.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/store/index.js b/core/frontend/src/store/index.js index 79d5cb63c6..d8ee5e643f 100644 --- a/core/frontend/src/store/index.js +++ b/core/frontend/src/store/index.js @@ -452,7 +452,11 @@ const data = { currentFilters.push(condition) } if (element.type === 'custom' && element.id === targetViewId) { // 过滤组件处理 - element.options.value = [dimension.value] + if (['de-select-tree'].includes(element.component)) { + element.options.value = dimension.value + } else { + element.options.value = [dimension.value] + } // 去掉动态时间 if (element.options.manualModify) { element.options.manualModify = false @@ -486,10 +490,20 @@ const data = { Object.keys(params).forEach(function(sourceInfo) { // 获取外部参数的值 sourceInfo 是外部参数名称 支持数组传入 let paramValue = params[sourceInfo] + let paramValueStr = params[sourceInfo] let operator = 'in' if (paramValue && !Array.isArray(paramValue)) { paramValue = [paramValue] operator = 'eq' + } else if (paramValue && Array.isArray(paramValue)) { + paramValueStr = '' + paramValue.forEach((innerValue, index) => { + if (index === 0) { + paramValueStr = innerValue + } else { + paramValueStr = paramValueStr + ',' + innerValue + } + }) } // 获取所有目标联动信息 const targetInfoList = trackInfo[sourceInfo] || [] @@ -513,7 +527,11 @@ const data = { currentFilters.push(condition) } if (element.type === 'custom' && element.id === targetViewId) { // 过滤组件处理 - element.options.value = paramValue + if (['de-select-tree'].includes(element.component)) { + element.options.value = paramValueStr + } else { + element.options.value = paramValue + } // 去掉动态时间 if (element.options.manualModify) { element.options.manualModify = false