fix(嵌入式): 仪表板/数据大屏设计器嵌入问题

This commit is contained in:
dataeaseShu 2024-03-21 15:20:15 +08:00
parent f2ba617ce1
commit aa42149802
2 changed files with 28 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import findComponent from '../../utils/components'
import DvSidebar from '../../components/visualization/DvSidebar.vue'
import router from '@/router'
import MobileConfigPanel from './MobileConfigPanel.vue'
import { useAppStoreWithOut } from '@/store/modules/app'
import { useEmitt } from '@/hooks/web/useEmitt'
import DbToolbar from '@/components/dashboard/DbToolbar.vue'
import ViewEditor from '@/views/chart/components/editor/index.vue'
@ -47,6 +48,8 @@ const {
dvInfo
} = storeToRefs(dvMainStore)
const dataInitState = ref(false)
const appStore = useAppStoreWithOut()
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
const state = reactive({
datasetTree: [],
@ -174,7 +177,11 @@ onUnmounted(() => {
</script>
<template>
<div class="dv-common-layout dv-teleport-query" v-if="loadFinish && !mobileConfig">
<div
class="dv-common-layout dv-teleport-query"
:class="isDataEaseBi && 'dataease-w-h'"
v-if="loadFinish && !mobileConfig"
>
<DbToolbar />
<el-container
class="dv-layout-container"
@ -255,6 +262,7 @@ onUnmounted(() => {
.dv-common-layout {
height: 100vh;
width: 100vw;
.dv-layout-container {
height: calc(100vh - @top-bar-height);
.left-sidebar {
@ -283,6 +291,14 @@ onUnmounted(() => {
height: 100%;
}
}
&.dataease-w-h {
height: 100%;
width: 100%;
.dv-layout-container {
height: calc(100% - @top-bar-height);
}
}
}
.preview-aside {

View File

@ -5,6 +5,7 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
import { contextmenuStoreWithOut } from '@/store/modules/data-visualization/contextmenu'
import { composeStoreWithOut } from '@/store/modules/data-visualization/compose'
import { useAppStoreWithOut } from '@/store/modules/app'
import { storeToRefs } from 'pinia'
import DvToolbar from '../../components/data-visualization/DvToolbar.vue'
import ComponentToolBar from '../../components/data-visualization/ComponentToolBar.vue'
@ -45,7 +46,8 @@ const eventCheck = e => {
}
}
const mainCanvasCoreRef = ref(null)
const appStore = useAppStoreWithOut()
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
const contextmenuStore = contextmenuStoreWithOut()
@ -300,7 +302,7 @@ eventBus.on('handleNew', handleNew)
</script>
<template>
<div ref="dvLayout" class="dv-common-layout">
<div ref="dvLayout" class="dv-common-layout" :class="isDataEaseBi && 'dataease-w-h'">
<DvToolbar />
<div class="custom-dv-divider" />
<el-container
@ -423,6 +425,13 @@ eventBus.on('handleNew', handleNew)
height: 100%;
}
}
&.dataease-w-h {
height: 100%;
width: 100%;
.dv-layout-container {
height: calc(100% - @top-bar-height);
}
}
}
.preview-aside {