From b5d204dbd96e8a1af0518063b239cceadd508910 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 5 Jul 2024 11:30:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6=E5=85=81=E8=AE=B8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=BB=84=E5=90=88=E9=87=8C=E7=9A=84=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=20#10247?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v-query/QueryConditionConfiguration.vue | 42 +++++++++++++++++-- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index d7c4865081..803848f0bf 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -70,23 +70,57 @@ const snapshotStore = snapshotStoreWithOut() const dfsComponentData = () => { const isMain = componentData.value.some(ele => ele.id === queryElement.value.id) - let arr = componentData.value.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType)) + let isGroup = false + let arr = componentData.value.filter( + com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group' + ) let tabArr = [] + let groupArr = [] componentData.value.forEach(ele => { if (ele.innerType === 'DeTabs') { ele.propValue.forEach(itx => { if (itx.componentData.some(item => item.id === queryElement.value.id) && !isMain) { - tabArr = itx.componentData.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType)) + tabArr = itx.componentData.filter( + com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group' + ) } else { arr = [ ...arr, - ...itx.componentData.filter(com => !['VQuery', 'DeTabs'].includes(com.innerType)) + ...itx.componentData.filter( + com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group' + ) ] } }) + } else if (ele.component === 'Group') { + isGroup = ele.propValue.some(item => item.id === queryElement.value.id) + groupArr = [ + ele.propValue.filter( + com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group' + ) + ] + ele.propValue.forEach(element => { + if (element.innerType === 'DeTabs') { + element.propValue.forEach(itx => { + if (itx.componentData.some(item => item.id === queryElement.value.id) && !isMain) { + tabArr = itx.componentData.filter( + com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group' + ) + } else { + groupArr = [ + ...groupArr, + ...itx.componentData.filter( + com => !['VQuery', 'DeTabs'].includes(com.innerType) && com.component !== 'Group' + ) + ] + } + }) + } + }) } }) - return isMain ? arr : tabArr + + return isMain || isGroup ? [...arr, ...groupArr].flat() : tabArr } const datasetFieldList = computed(() => {