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 f08905b9cf..c79e97a3b9 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -207,6 +207,24 @@ const onPointClick = param => { emits('onPointClick', param) } +const onWrapperClick = () => { + if (['Picture,ScrollText'].includes(config.value.component)) { + // doWrapperClick + if (config.value.events && config.value.events.checked) { + if (config.value.events.type === 'displayChange') { + // 打开弹框区域 + nextTick(() => { + dvMainStore.popAreaActiveSwitch() + }) + } else if (config.value.events.type === 'jump') { + window.open(config.value.events.jump.value, '_blank') + } else if (config.value.events.type === 'refresh') { + useEmitt().emitter.emit('componentRefresh') + } + } + } +} + const deepScale = computed(() => scale.value / 100) @@ -247,6 +265,7 @@ const deepScale = computed(() => scale.value / 100) class="wrapper-inner-adaptor" :style="slotStyle" :class="{ 'pop-wrapper-inner': popActive }" + @click="onWrapperClick" > { if (downloadStatus.value) { return @@ -228,14 +236,18 @@ const initRefreshTimer = () => { } } refreshTimer.value = setInterval(() => { - searchCount.value++ - if (isMainCanvas(canvasId.value)) { - refreshOtherComponent(dvInfo.value.id, dvInfo.value.type) - } + refreshDataV() }, refreshTime) } } +const refreshDataV = () => { + searchCount.value++ + if (isMainCanvas(canvasId.value)) { + refreshOtherComponent(dvInfo.value.id, dvInfo.value.type) + } +} + const initWatermark = (waterDomId = 'preview-canvas-main') => { if (dvInfo.value.watermarkInfo && isMainCanvas(canvasId.value)) { if (userInfo.value && userInfo.value.model !== 'lose') { diff --git a/core/core-frontend/src/custom-component/common/CommonAttr.vue b/core/core-frontend/src/custom-component/common/CommonAttr.vue index 4044854748..bb8b6e746b 100644 --- a/core/core-frontend/src/custom-component/common/CommonAttr.vue +++ b/core/core-frontend/src/custom-component/common/CommonAttr.vue @@ -95,8 +95,7 @@ const colorPickerWidth = computed(() => { // 暂时关闭 const eventsShow = computed(() => { - return false - // return !dashboardActive.value && ['Picture'].includes(element.value.component) + return !dashboardActive.value && ['Picture'].includes(element.value.component) }) const backgroundCustomShow = computed(() => { diff --git a/core/core-frontend/src/custom-component/common/CommonEvent.vue b/core/core-frontend/src/custom-component/common/CommonEvent.vue index 6f40d96a09..697c4d58b7 100644 --- a/core/core-frontend/src/custom-component/common/CommonEvent.vue +++ b/core/core-frontend/src/custom-component/common/CommonEvent.vue @@ -1,7 +1,8 @@