2021-04-01 17:40:12 +08:00
|
|
|
<template>
|
|
|
|
<de-container>
|
|
|
|
<de-aside-container>
|
2021-05-27 12:04:11 +08:00
|
|
|
<el-tabs v-model="activeName" class="tab-header" @tab-click="handleClick" type="card" :stretch="true">
|
2021-04-01 17:40:12 +08:00
|
|
|
<el-tab-pane name="PanelList">
|
2021-05-18 14:09:51 +08:00
|
|
|
<span slot="label"><i class="el-icon-document" />{{ $t('panel.panel_list') }}</span>
|
2021-04-01 17:40:12 +08:00
|
|
|
<panel-list />
|
|
|
|
</el-tab-pane>
|
2021-04-20 14:19:10 +08:00
|
|
|
<el-tab-pane name="panels_star" :lazy="true">
|
2021-05-18 14:09:51 +08:00
|
|
|
<span slot="label"><i class="el-icon-star-off" />{{ $t('panel.store') }}</span>
|
2021-04-20 14:19:10 +08:00
|
|
|
<enshrine v-if="showEnshrine" />
|
2021-04-01 17:40:12 +08:00
|
|
|
</el-tab-pane>
|
|
|
|
<el-tab-pane name="panels_share" :lazy="true">
|
2021-05-18 14:09:51 +08:00
|
|
|
<span slot="label"><i class="el-icon-share" />{{ $t('panel.share') }}</span>
|
2021-04-01 17:40:12 +08:00
|
|
|
<share-tree v-if="showShare" />
|
|
|
|
</el-tab-pane>
|
|
|
|
</el-tabs>
|
|
|
|
</de-aside-container>
|
|
|
|
<de-main-container>
|
2021-05-25 18:58:47 +08:00
|
|
|
<PanelViewShow v-if="mainActiveName==='PanelMain'" />
|
2021-04-01 17:40:12 +08:00
|
|
|
</de-main-container>
|
|
|
|
</de-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import DeMainContainer from '@/components/dataease/DeMainContainer'
|
|
|
|
import DeContainer from '@/components/dataease/DeContainer'
|
|
|
|
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
|
|
|
import PanelList from '../list/PanelList'
|
|
|
|
import PanelViewShow from '../list/PanelViewShow'
|
|
|
|
import ShareTree from '../GrantAuth/shareTree'
|
2021-04-20 14:19:10 +08:00
|
|
|
import Enshrine from '../enshrine/index'
|
2021-04-01 17:40:12 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'PanelMain',
|
2021-04-20 14:19:10 +08:00
|
|
|
components: { DeMainContainer, DeContainer, DeAsideContainer, PanelList, PanelViewShow, ShareTree, Enshrine },
|
2021-04-01 17:40:12 +08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
activeName: 'PanelList',
|
2021-04-20 14:19:10 +08:00
|
|
|
showShare: false,
|
|
|
|
showEnshrine: false
|
2021-04-01 17:40:12 +08:00
|
|
|
}
|
|
|
|
},
|
2021-05-25 18:58:47 +08:00
|
|
|
computed: {
|
|
|
|
mainActiveName() {
|
|
|
|
return this.$store.state.panel.mainActiveName
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.$store.dispatch('panel/setMainActiveName', 'PanelMain')
|
|
|
|
},
|
2021-04-01 17:40:12 +08:00
|
|
|
methods: {
|
|
|
|
handleClick(tab, event) {
|
|
|
|
// 点击分析面板需要刷新分享内容
|
|
|
|
if (tab.name === 'panels_share') {
|
|
|
|
this.refreshShare()
|
|
|
|
}
|
2021-04-20 14:19:10 +08:00
|
|
|
if (tab.name === 'panels_star') {
|
|
|
|
this.refreshEnshrine()
|
|
|
|
}
|
2021-04-01 17:40:12 +08:00
|
|
|
},
|
|
|
|
refreshShare() {
|
|
|
|
this.showShare = false
|
|
|
|
this.$nextTick(() => (this.showShare = true))
|
2021-04-20 14:19:10 +08:00
|
|
|
},
|
|
|
|
refreshEnshrine() {
|
|
|
|
this.showEnshrine = false
|
|
|
|
this.$nextTick(() => (this.showEnshrine = true))
|
2021-04-01 17:40:12 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.ms-aside-container {
|
|
|
|
height: calc(100vh - 56px);
|
2021-04-08 16:54:37 +08:00
|
|
|
padding: 0px;
|
2021-04-01 17:40:12 +08:00
|
|
|
min-width: 260px;
|
|
|
|
max-width: 460px;
|
|
|
|
}
|
|
|
|
.ms-main-container {
|
|
|
|
height: calc(100vh - 56px);
|
2021-04-08 16:54:37 +08:00
|
|
|
padding: 0px;
|
2021-04-01 17:40:12 +08:00
|
|
|
}
|
|
|
|
|
2021-05-27 12:04:11 +08:00
|
|
|
.tab-header>>>.el-tabs__item{
|
|
|
|
font-size: 13px;
|
|
|
|
background-color: #E8EAED;
|
|
|
|
padding: 0 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tab-header>>>.is-active{
|
|
|
|
background-color: #ffffff;
|
|
|
|
border-bottom-color: #ffffff!important;
|
|
|
|
}
|
|
|
|
.tab-header>>>.el-tabs__nav-scroll{
|
|
|
|
padding-left: 0!important;
|
|
|
|
}
|
|
|
|
|
2021-04-01 17:40:12 +08:00
|
|
|
</style>
|