From d90c8abcec2ab06ac7f69a191d2c72155ad29a87 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 28 Dec 2023 10:37:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90=E5=B5=8C=E5=85=A5=E5=BC=8F?= =?UTF-8?q?=E3=80=91-=E8=A7=86=E5=9B=BE=E9=A2=84=E8=A7=88=E4=B8=AD?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=B1=95=E7=A4=BA=E6=95=B0=E6=8D=AE=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E4=B8=AD=E7=BB=84=E5=90=88=E7=9A=84=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/panel/ViewWrapper.vue | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/pages/panel/ViewWrapper.vue b/core/core-frontend/src/pages/panel/ViewWrapper.vue index 2798ffbf0c..18f7c2af65 100644 --- a/core/core-frontend/src/pages/panel/ViewWrapper.vue +++ b/core/core-frontend/src/pages/panel/ViewWrapper.vue @@ -29,10 +29,29 @@ onBeforeMount(() => { state.dvInfo = dvInfo state.curPreviewGap = curPreviewGap - viewInfo.value = canvasViewInfoPreview[window.DataEaseBi.chartId] - config.value = ((canvasDataResult as unknown as Array<{ id: string }>) || []).find( - ele => ele.id === window.DataEaseBi.chartId - ) + viewInfo.value = canvasViewInfoPreview[window.DataEaseBi.chartId] = ( + (canvasDataResult as unknown as Array<{ + id: string + component: string + propValue: Array<{ id: string }> + }>) || [] + ).some(ele => { + if (ele.id === window.DataEaseBi.chartId) { + config.value = ele + return true + } + + if (ele.component === 'Group') { + return (ele.propValue || []).some(itx => { + if (itx.id === window.DataEaseBi.chartId) { + config.value = itx + return true + } + return false + }) + } + return false + }) } ) })