diff --git a/core/core-frontend/src/components/visualization/common/DeFullscreenButton.vue b/core/core-frontend/src/components/visualization/common/DeFullscreenButton.vue new file mode 100644 index 0000000000..df3d5198fa --- /dev/null +++ b/core/core-frontend/src/components/visualization/common/DeFullscreenButton.vue @@ -0,0 +1,48 @@ + + + + + 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 7e202e3b66..0271bbda48 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -23,6 +23,7 @@ import { get, set } from 'lodash-es' export const dvMainStore = defineStore('dataVisualization', { state: () => { return { + fullscreenFlag: false, // 全屏启用标识 staticResourcePath: '/static-resource/', canvasCollapse: { defaultSide: false, @@ -442,6 +443,9 @@ export const dvMainStore = defineStore('dataVisualization', { this.curLinkageView = this.curComponent this.targetLinkageInfo = targetLinkageInfo }, + setFullscreenFlag(val) { + this.fullscreenFlag = val + }, removeViewFilter(componentId) { this.componentData = this.componentData.map(item => { const newItem = item diff --git a/core/core-frontend/src/style/index.less b/core/core-frontend/src/style/index.less index 4e79048f4c..1fb9324735 100644 --- a/core/core-frontend/src/style/index.less +++ b/core/core-frontend/src/style/index.less @@ -495,3 +495,16 @@ strong { top: calc(50% - 22px) !important; left: calc(50% - 40px) !important; } + +// 解决screenfull全屏时 部分嵌入到body中的组件(如 下来框 消息通知框等)被覆盖问题 +// 这里使用的方案为直接将body全屏 区间组件覆盖整个body +.de-screen-full{ + position:fixed !important; + z-index:200; + top: 0; + left: 0; + right: 0; + bottom: 0; + width: 100%; + height: 100% !important; +} diff --git a/core/core-frontend/src/views/dashboard/DashboardPreviewShow.vue b/core/core-frontend/src/views/dashboard/DashboardPreviewShow.vue index 12a022e2f6..9c1ef24cfd 100644 --- a/core/core-frontend/src/views/dashboard/DashboardPreviewShow.vue +++ b/core/core-frontend/src/views/dashboard/DashboardPreviewShow.vue @@ -13,7 +13,7 @@ import { usePermissionStoreWithOut } from '@/store/modules/permission' import { useMoveLine } from '@/hooks/web/useMoveLine' import { Icon } from '@/components/icon-custom' import { download2AppTemplate, downloadCanvas2 } from '@/utils/imgUtils' -import screenfull from 'screenfull' +import { storeToRefs } from 'pinia' const dvMainStore = dvMainStoreWithOut() const previewCanvasContainer = ref(null) @@ -32,6 +32,8 @@ const state = reactive({ curPreviewGap: 0 }) +const { fullscreenFlag } = storeToRefs(dvMainStore) + const { width, node } = useMoveLine('DASHBOARD') const props = defineProps({ @@ -154,13 +156,6 @@ const mouseleave = () => { appStore.setArrowSide(false) } -const fullscreenPreview = () => { - const ele = document.getElementById('de-preview-content') //指定全屏区域元素 - if (screenfull.isEnabled) { - screenfull.request(ele) - } -} - defineExpose({ getPreviewStateInfo }) @@ -216,9 +211,13 @@ defineExpose({ @reload="reload" @download="downloadH2" @downloadAsAppTemplate="downloadAsAppTemplate" - @fullscreenPreview="fullscreenPreview" /> -
+
{ } const isDataEaseBi = computed(() => appStore.getIsDataEaseBi) -const fullscreenPreview = () => { - emit('fullscreenPreview', dvInfo.value.id) -} - const reload = () => { emit('reload', dvInfo.value.id) } @@ -106,12 +103,7 @@ const initOpenHandler = newWindow => {
- - - 全屏 +