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 })