提交 2222eda1 authored 作者: wangjiahao's avatar wangjiahao

fix: 编辑仪表盘 全屏预览问题

上级 c38bc7f3
...@@ -148,6 +148,7 @@ export default { ...@@ -148,6 +148,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.bg { .bg {
height: 100vh!important;
min-width: 800px; min-width: 800px;
min-height: 600px; min-height: 600px;
width: 100%; width: 100%;
......
<template> <template>
<div style="width: 100%;height: 100vh;"> <div style="width: 100%;height: 100vh;">
<span style="line-height: 35px; position: absolute; top:10px;right: 20px;z-index:100000"> <span style="line-height: 35px; position: absolute; top:10px;right: 20px;z-index:100000">
<el-button size="mini" @click="toDir"> <el-button size="mini" @click="close">
关闭 关闭
</el-button> </el-button>
</span> </span>
...@@ -18,9 +18,8 @@ export default { ...@@ -18,9 +18,8 @@ export default {
components: { Preview }, components: { Preview },
methods: { methods: {
toDir() { close() {
this.$router.replace('/panel/index') bus.$emit('previewFullScreenClose')
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
} }
} }
} }
......
...@@ -221,8 +221,7 @@ export default { ...@@ -221,8 +221,7 @@ export default {
}, },
clickPreview() { clickPreview() {
// 编辑时临时保存 当前修改的画布 this.$emit('previewFullScreen')
this.$router.replace('/PreviewFullScreen')
} }
} }
} }
......
...@@ -99,6 +99,22 @@ div:focus { ...@@ -99,6 +99,22 @@ div:focus {
} }
} }
.preview-dialog {
padding: 0px!important;
.el-dialog--center{
padding: 0px!important;
}
.el-dialog__header{
display:none!important;
}
.el-dialog__body{
padding: 0px!important;
height: 100vh!important;
}
}
.de-search-header { .de-search-header {
.el-tabs__header{ .el-tabs__header{
display: none !important;; display: none !important;;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</el-col> </el-col>
<!--横向工具栏--> <!--横向工具栏-->
<el-col :span="16"> <el-col :span="16">
<Toolbar @showPanel="showPanel" @close-left-panel="closeLeftPanel" /> <Toolbar @showPanel="showPanel" @close-left-panel="closeLeftPanel" @previewFullScreen="previewFullScreen" />
</el-col> </el-col>
</el-header> </el-header>
<de-container> <de-container>
...@@ -110,6 +110,15 @@ ...@@ -110,6 +110,15 @@
</span> </span>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
v-if="previewVisible"
:visible.sync="previewVisible"
:fullscreen="true"
custom-class="preview-dialog"
>
<PreviewFullScreen />
</el-dialog>
</el-row> </el-row>
</template> </template>
...@@ -130,6 +139,7 @@ import { mapState } from 'vuex' ...@@ -130,6 +139,7 @@ import { mapState } from 'vuex'
import { uuid } from 'vue-uuid' import { uuid } from 'vue-uuid'
import Toolbar from '@/components/canvas/components/Toolbar' import Toolbar from '@/components/canvas/components/Toolbar'
import { get } from '@/api/panel/panel' import { get } from '@/api/panel/panel'
import PreviewFullScreen from '@/components/canvas/components/Editor/PreviewFullScreen'
// 引入样式 // 引入样式
import '@/components/canvas/assets/iconfont/iconfont.css' import '@/components/canvas/assets/iconfont/iconfont.css'
...@@ -149,7 +159,8 @@ export default { ...@@ -149,7 +159,8 @@ export default {
Editor, Editor,
Toolbar, Toolbar,
FilterDialog, FilterDialog,
SubjectSetting SubjectSetting,
PreviewFullScreen
}, },
data() { data() {
return { return {
...@@ -164,7 +175,8 @@ export default { ...@@ -164,7 +175,8 @@ export default {
filterVisible: false, filterVisible: false,
currentWidget: null, currentWidget: null,
currentFilterCom: null, currentFilterCom: null,
subjectVisible: false subjectVisible: false,
previewVisible: false
} }
}, },
...@@ -211,6 +223,10 @@ export default { ...@@ -211,6 +223,10 @@ export default {
bus.$on('component-dialog-edit', () => { bus.$on('component-dialog-edit', () => {
this.eidtDialog() this.eidtDialog()
}) })
bus.$on('previewFullScreenClose', () => {
this.previewVisible = false
})
}, },
beforeDestroy() { beforeDestroy() {
const elx = this.$refs.rightPanel const elx = this.$refs.rightPanel
...@@ -375,7 +391,11 @@ export default { ...@@ -375,7 +391,11 @@ export default {
debugger debugger
this.show = false this.show = false
// this.beforeDestroy() // this.beforeDestroy()
},
previewFullScreen() {
this.previewVisible = true
} }
} }
} }
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论