diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index 9a6b1e1261..cca9034bdd 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -15,6 +15,7 @@ import { isMobile } from '@/utils/utils' import { isDashboard } from '@/utils/canvasUtils' import { XpackComponent } from '@/components/plugin' import { useAppStoreWithOut } from '@/store/modules/app' +import DePreviewPopDialog from '@/components/visualization/DePreviewPopDialog.vue' const appStore = useAppStoreWithOut() const componentWrapperInnerRef = ref(null) @@ -23,6 +24,7 @@ const dvMainStore = dvMainStoreWithOut() const downLoading = ref(false) const { wsCache } = useCache('localStorage') const commonFilterAttrs = ['width', 'height', 'top', 'left', 'rotate'] +const dePreviewPopDialogRef = ref(null) const commonFilterAttrsFilterBorder = [ 'width', 'height', @@ -320,25 +322,9 @@ const onWrapperClick = e => { const jumpType = config.value.events.jump.type try { if ('newPop' === jumpType) { - console.info('DataEase Component Jump newPop value:' + window['originOpen']) - if (window['originOpen']) { - console.info('DataEase Component originOpen newPop') - window['originOpen']( - url, - '_blank', - 'width=800,height=600,left=200,top=100,toolbar=no,scrollbars=yes,resizable=yes,location=no' - ) - } else { - window.open( - url, - '_blank', - 'width=800,height=600,left=200,top=100,toolbar=no,scrollbars=yes,resizable=yes,location=no' - ) - } + dePreviewPopDialogRef.value.previewInit({ url, size: 'middle' }) } else if ('_blank' === jumpType) { - console.info('DataEase Component Jump _blank value:' + window['originOpen']) if (window['originOpen']) { - console.info('DataEase Component originOpen _blank') window['originOpen'](url, '_blank') } else { window.open(url, '_blank') @@ -455,6 +441,7 @@ const showActive = computed(() => props.popActive || (dvMainStore.mobileInPc && ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" /> + diff --git a/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue b/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue index 88deee27ac..0192b360ba 100644 --- a/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue +++ b/core/core-frontend/src/components/visualization/DePreviewPopDialog.vue @@ -49,7 +49,7 @@ const previewInit = params => { if (params.url.includes('?')) { state.url = `${params.url}&popWindow=true` } else { - state.url = `${params.url}&popWindow=true` + state.url = `${params.url}?popWindow=true` } if (params.size === 'large') { state.fullscreen = true diff --git a/core/core-frontend/src/custom-component/common/CommonEvent.vue b/core/core-frontend/src/custom-component/common/CommonEvent.vue index c382a66ae1..0ffbd31d36 100644 --- a/core/core-frontend/src/custom-component/common/CommonEvent.vue +++ b/core/core-frontend/src/custom-component/common/CommonEvent.vue @@ -130,6 +130,11 @@ const typeMap = {