提交 c53e121c authored 作者: wangjiahao's avatar wangjiahao

refactor:从仪表板进入视图编辑界面时,顶部菜单去掉

上级 329107c9
<template>
<div :class="classObj" class="app-wrapper">
<licbar />
<topbar v-if="componentName!=='PanelEdit'" />
<topbar v-if="!fullHeightFlag" />
<de-container :style="mainStyle">
<de-aside-container v-if="!sidebar.hide" class="le-aside-container">
......@@ -62,7 +62,7 @@ export default {
return this.$store.state.settings.showSettings
},
fullHeightFlag() {
return this.componentName === 'PanelEdit'
return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit'
},
mainStyle() {
if (this.fullHeightFlag) {
......
......@@ -1119,7 +1119,9 @@ export default {
this.refreshGroup(view)
this.closeChangeChart()
// 从仪表板入口关闭
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
if (this.$route.path.indexOf('panel') > -1) {
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
}
// this.$emit('switchComponent', { name: '' })
this.$success(this.$t('commons.save_success'))
})
......
<template>
<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" />
<chart-edit v-if="componentName==='ChartEdit'" :param="param" />
<panel-edit v-if="componentName==='PanelEdit'" />
......@@ -27,6 +27,11 @@ export default {
param: {}
}
},
computed: {
fullHeightFlag() {
return this.componentName === 'PanelEdit' || this.componentName === 'ChartEdit'
}
},
watch: {
$route(to, from) {
console.log(to)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论