fix(仪表板): 修复部分仪表板的预览界面如全屏预览,复用预览含有tab组件时,tab内部视图出现错位重叠问题

This commit is contained in:
wangjiahao 2022-11-01 15:41:32 +08:00
parent cf63eb66b1
commit ed13b5bcba
5 changed files with 29 additions and 11 deletions

View File

@ -6,7 +6,7 @@
>
<Preview
v-if="!dataLoading"
:component-data="componentData"
:component-data="mainCanvasComponentData"
:canvas-style-data="canvasStyleData"
:back-screen-shot="backScreenShot"
:panel-info="panelInfo"
@ -22,11 +22,13 @@ import { queryTargetPanelJumpInfo } from '@/api/panel/linkJump'
import { proxyInitPanelData } from '@/api/panel/shareProxy'
import { getOuterParamsInfo } from '@/api/panel/outerParams'
import { mapState } from 'vuex'
import { getNowCanvasComponentData } from '@/components/canvas/utils/utils'
export default {
components: { Preview },
data() {
return {
canvasId: 'canvas-main',
dataLoading: false,
backScreenShot: false,
mainHeight: '100vh!important',
@ -34,6 +36,9 @@ export default {
}
},
computed: {
mainCanvasComponentData() {
return getNowCanvasComponentData(this.canvasId)
},
bgStyle() {
if (this.backScreenShot) {
return { height: this.mainHeight }

View File

@ -7,7 +7,7 @@
>
<Preview
v-if="fullscreen"
:component-data="componentData"
:component-data="mainCanvasComponentData"
:canvas-style-data="canvasStyleData"
:panel-info="panelInfo"
:in-screen="!fullscreen"
@ -21,21 +21,25 @@
import Preview from './Preview'
import bus from '@/utils/bus'
import { mapState } from 'vuex'
import { getNowCanvasComponentData } from '@/components/canvas/utils/utils'
export default {
components: { Preview },
data() {
return {
canvasId: 'canvas-main',
fullscreen: false
}
},
computed: {
mainCanvasComponentData() {
return getNowCanvasComponentData(this.canvasId)
},
panelInfo() {
return this.$store.state.panel.panelInfo
},
...mapState([
'canvasStyleData',
'componentData'
'canvasStyleData'
])
},
mounted() {

View File

@ -2,7 +2,7 @@
<div style="width: 100%;height: 100vh;background-color: #f7f8fa">
<Preview
v-if="show"
:component-data="componentData"
:component-data="mainCanvasComponentData"
:canvas-style-data="canvasStyleData"
:panel-info="panelInfo"
/>
@ -15,7 +15,7 @@ import { uuid } from 'vue-uuid'
import Preview from '@/components/canvas/components/Editor/Preview'
import { getPanelAllLinkageInfo } from '@/api/panel/linkage'
import { queryPanelJumpInfo, queryTargetPanelJumpInfo } from '@/api/panel/linkJump'
import { panelInit } from '@/components/canvas/utils/utils'
import { getNowCanvasComponentData, panelInit } from '@/components/canvas/utils/utils'
import { getOuterParamsInfo } from '@/api/panel/outerParams'
import { mapState } from 'vuex'
@ -34,14 +34,17 @@ export default {
},
data() {
return {
canvasId: 'canvas-main',
show: false,
panelInfo: {}
}
},
computed: {
mainCanvasComponentData() {
return getNowCanvasComponentData(this.canvasId)
},
...mapState([
'canvasStyleData',
'componentData'
'canvasStyleData'
])
},
created() {

View File

@ -16,7 +16,7 @@
<de-main-container>
<Preview
v-if="selectedPanel"
:component-data="componentData"
:component-data="mainCanvasComponentData"
:canvas-style-data="canvasStyleData"
:panel-info="panelInfo"
:show-position="showPosition"
@ -41,7 +41,7 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer'
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
import { findOne } from '@/api/panel/panel'
import { deepCopy, panelDataPrepare } from '@/components/canvas/utils/utils'
import { deepCopy, getNowCanvasComponentData, panelDataPrepare } from '@/components/canvas/utils/utils'
import Preview from '@/components/canvas/components/Editor/Preview'
import MultiplexingView from '@/views/panel/ViewSelect/multiplexingView'
import { DEFAULT_COMMON_CANVAS_STYLE_STRING } from '@/views/panel/panel'
@ -59,6 +59,7 @@ export default {
},
data() {
return {
canvasId: 'canvas-main',
showPosition: 'multiplexing',
activeName: 'PanelList',
viewLoading: false,
@ -72,6 +73,11 @@ export default {
panelInfo: {}
}
},
computed: {
mainCanvasComponentData() {
return getNowCanvasComponentData(this.canvasId)
}
},
watch: {
},

View File

@ -362,7 +362,7 @@
:panel-info="panelInfo"
:show-type="canvasStyleData.selfAdaption?'full':'width'"
:canvas-style-data="canvasStyleData"
:component-data="componentData"
:component-data="mainCanvasComponentData"
show-position="edit"
/>
</fullscreen>