From 05efed505246a3c2a5ef8ba41ff7abf330f3c887 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 25 Feb 2025 11:05:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E4=BF=AE=E5=A4=8Difra?= =?UTF-8?q?me=E5=B5=8C=E5=85=A5=E5=9B=BE=E8=A1=A8=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/visualization/ComponentEditBar.vue | 4 ++-- .../src/components/visualization/DePreviewPopDialog.vue | 6 +++++- .../src/store/modules/data-visualization/dvMain.ts | 6 +++++- .../src/views/data-visualization/PreviewCanvas.vue | 2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/components/visualization/ComponentEditBar.vue b/core/core-frontend/src/components/visualization/ComponentEditBar.vue index cdfef7d1d9..65351206b4 100644 --- a/core/core-frontend/src/components/visualization/ComponentEditBar.vue +++ b/core/core-frontend/src/components/visualization/ComponentEditBar.vue @@ -363,7 +363,7 @@ const { canvasViewInfo, mobileInPc, dvInfo, - isIframe, + isPopWindow, hiddenListStatus } = storeToRefs(dvMainStore) @@ -634,7 +634,7 @@ const initCurFields = () => { } const showDownload = computed( - () => canvasViewInfo.value[element.value.id]?.dataFrom !== 'template' && !isIframe.value + () => canvasViewInfo.value[element.value.id]?.dataFrom !== 'template' && !isPopWindow.value ) // 富文本-End diff --git a/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue b/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue index 485d615e37..c6389ab09f 100644 --- a/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue +++ b/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue @@ -43,7 +43,11 @@ const dialogStyle = computed(() => { }) const previewInit = params => { - state.url = params.url + if (params.url.includes('?')) { + state.url = `${params.url}&popWindow=true` + } else { + state.url = `${params.url}&popWindow=true` + } if (params.size === 'large') { state.fullscreen = true } else if (params.size === 'middle') { diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 58814f6626..299893d751 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -197,7 +197,8 @@ export const dvMainStore = defineStore('dataVisualization', { dataPrepareState: false, //数据准备状态 multiplexingStyleAdapt: true, //复用样式跟随主题 mainScrollTop: 0, //主画布运动量 - isIframe: false // 当前是否在iframe中 + isIframe: false, // 当前是否在iframe中 + isPopWindow: false // 当前是否在iframe弹框中 } }, actions: { @@ -211,6 +212,9 @@ export const dvMainStore = defineStore('dataVisualization', { setIframeFlag(value) { this.isIframe = value }, + setIsPopWindow(value) { + this.isPopWindow = value + }, setCanvasAttachInfo(value) { this.canvasAttachInfo = value }, diff --git a/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue b/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue index 2fafcbfd12..e85f462d37 100644 --- a/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue +++ b/core/core-frontend/src/views/data-visualization/PreviewCanvas.vue @@ -177,8 +177,10 @@ onMounted(async () => { const dvId = embeddedStore.dvId || router.currentRoute.value.query.dvId // 检查外部参数 const ignoreParams = router.currentRoute.value.query.ignoreParams === 'true' + const isPopWindow = router.currentRoute.value.query.popWindow === 'true' const isFrameFlag = window.self !== window.top dvMainStore.setIframeFlag(isFrameFlag) + dvMainStore.setIsPopWindow(isPopWindow) const { dvType, callBackFlag, taskId, showWatermark } = router.currentRoute.value.query if (!!taskId) { dvMainStore.setCanvasAttachInfo({ taskId, showWatermark })