From 39fb90b0f1baf2ed9af8010c756b74ac2660e1f2 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 10 Jul 2024 15:52:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E8=A7=84=E5=88=99=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=98=AF=E5=88=87=E6=8D=A2=E4=BD=BF=E7=94=A8=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=B1=82=E7=BA=A7=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E8=B7=9F=E9=9A=8F=E5=8F=91=E7=94=9F=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v-query/QueryConditionConfiguration.vue | 3 +++ .../src/custom-component/v-query/Select.vue | 26 ++++++++++++++----- .../views/chart/components/editor/index.vue | 2 +- 3 files changed, 24 insertions(+), 7 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 c66b6b0860..8afe679612 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -328,6 +328,9 @@ const setParameters = () => { } }) setType() + if (curComponent.value.displayType === '9') { + setTreeDefault() + } } const setType = () => { diff --git a/core/core-frontend/src/custom-component/v-query/Select.vue b/core/core-frontend/src/custom-component/v-query/Select.vue index c2ae81bac9..4ae900a494 100644 --- a/core/core-frontend/src/custom-component/v-query/Select.vue +++ b/core/core-frontend/src/custom-component/v-query/Select.vue @@ -110,7 +110,11 @@ const setCascadeValueBack = val => { cascade.value.forEach(ele => { ele.forEach(item => { if (item.datasetId.split('--')[1] === config.value.id) { - item.selectValue = Array.isArray(val) ? [...val] : val + if (props.isConfig) { + item.selectValue = Array.isArray(val) ? [...val] : val + } else { + item.currentSelectValue = Array.isArray(val) ? [...val] : val + } } }) }) @@ -158,11 +162,21 @@ const getCascadeFieldId = () => { } filter.push(condition) } else { - if (!!item.selectValue.length) { - condition = { - fieldId: fieldId, - operator: 'in', - value: [...item.selectValue] + if (props.isConfig) { + if (!!item.selectValue?.length) { + condition = { + fieldId: fieldId, + operator: 'in', + value: [...item.selectValue] + } + } + } else { + if (!!item.currentSelectValue?.length) { + condition = { + fieldId: fieldId, + operator: 'in', + value: [...item.currentSelectValue] + } } } } diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 9940efe9bf..975cd5058b 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -356,7 +356,7 @@ provide('quotaData', realQuota) const startToMove = (e: DragEvent, item) => { e.dataTransfer.setData( - 'fields', + 'dimension', JSON.stringify( item .filter(ele => ele.id)