Merge pull request #1207 from dataease/pr@dev@refactor_panel-edit-layout

refactor:从仪表板进入视图编辑界面时,顶部菜单去掉
This commit is contained in:
王嘉豪 2021-11-15 18:54:02 +08:00 committed by GitHub
commit 4513d164a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div :class="classObj" class="app-wrapper"> <div :class="classObj" class="app-wrapper">
<licbar /> <licbar />
<topbar v-if="componentName!=='PanelEdit'" /> <topbar v-if="!fullHeightFlag" />
<de-container :style="mainStyle"> <de-container :style="mainStyle">
<de-aside-container v-if="!sidebar.hide" class="le-aside-container"> <de-aside-container v-if="!sidebar.hide" class="le-aside-container">
@ -62,7 +62,7 @@ export default {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
}, },
fullHeightFlag() { fullHeightFlag() {
return this.componentName === 'PanelEdit' return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit'
}, },
mainStyle() { mainStyle() {
if (this.fullHeightFlag) { if (this.fullHeightFlag) {

View File

@ -1119,7 +1119,9 @@ export default {
this.refreshGroup(view) this.refreshGroup(view)
this.closeChangeChart() this.closeChangeChart()
// //
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) if (this.$route.path.indexOf('panel') > -1) {
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
}
// this.$emit('switchComponent', { name: '' }) // this.$emit('switchComponent', { name: '' })
this.$success(this.$t('commons.save_success')) this.$success(this.$t('commons.save_success'))
}) })

View File

@ -1,6 +1,6 @@
<template> <template>
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]" style="background-color: #f7f8fa"> <de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]" style="background-color: #f7f8fa">
<de-main-container :class="{'full-height':componentName==='PanelEdit'}"> <de-main-container :class="{'full-height':fullHeightFlag}">
<panel-main v-show="componentName==='PanelMain'" ref="panel_main" /> <panel-main v-show="componentName==='PanelMain'" ref="panel_main" />
<chart-edit v-if="componentName==='ChartEdit'" :param="param" /> <chart-edit v-if="componentName==='ChartEdit'" :param="param" />
<panel-edit v-if="componentName==='PanelEdit'" /> <panel-edit v-if="componentName==='PanelEdit'" />
@ -27,6 +27,11 @@ export default {
param: {} param: {}
} }
}, },
computed: {
fullHeightFlag() {
return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit'
}
},
watch: { watch: {
$route(to, from) { $route(to, from) {
console.log(to) console.log(to)