dataease-dm/frontend/src/views/panel/index.vue

86 lines
2.1 KiB
Vue
Raw Normal View History

2021-03-08 14:31:09 +08:00
<template>
<de-container>
2021-03-08 14:31:09 +08:00
<de-aside-container>
<el-tabs v-model="activeName" @tab-click="handleClick">
2021-03-08 14:31:09 +08:00
<el-tab-pane name="PanelList">
2021-03-08 21:10:16 +08:00
<span slot="label"><i class="el-icon-document" />列表</span>
2021-03-23 09:44:44 +08:00
<panel-list />
2021-03-08 14:31:09 +08:00
</el-tab-pane>
<el-tab-pane name="panels_star">
2021-03-08 21:10:16 +08:00
<span slot="label"><i class="el-icon-star-off" />收藏</span>
2021-03-08 14:31:09 +08:00
开发中...
</el-tab-pane>
<el-tab-pane name="panels_share" :lazy="true">
2021-03-08 21:10:16 +08:00
<span slot="label"><i class="el-icon-share" />分享</span>
<share-tree v-if="showShare" />
2021-03-08 14:31:09 +08:00
</el-tab-pane>
2021-03-22 19:05:35 +08:00
2021-03-08 14:31:09 +08:00
</el-tabs>
</de-aside-container>
2021-03-08 14:31:09 +08:00
<de-main-container>
2021-03-22 19:05:35 +08:00
<component :is="component" :param="param" />
</de-main-container>
</de-container>
2021-03-08 14:31:09 +08:00
</template>
<script>
import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer'
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
2021-03-08 21:10:16 +08:00
// import Group from './group/Group'
import PanelList from './list/PanelList'
import PanelViewShow from './list/PanelViewShow'
2021-03-18 18:30:10 +08:00
import ShareTree from './GrantAuth/shareTree'
2021-03-08 14:31:09 +08:00
2021-03-08 21:10:16 +08:00
export default {
name: 'Panel',
2021-03-30 16:11:59 +08:00
components: { DeMainContainer, DeContainer, DeAsideContainer, PanelList, PanelViewShow, ShareTree },
2021-03-08 21:10:16 +08:00
data() {
return {
component: PanelViewShow,
2021-03-08 21:10:16 +08:00
param: {},
activeName: 'PanelList',
showShare: false
2021-03-08 21:10:16 +08:00
}
},
methods: {
handleClick(tab, event) {
// 点击分析面板需要刷新分享内容
if (tab.name === 'panels_share') {
this.refreshShare()
}
2021-03-08 14:31:09 +08:00
},
2021-03-22 19:05:35 +08:00
// switchComponent(c) {
// console.log(c)
// this.param = c.param
// switch (c.name) {
// case 'PanelViewShow':
// this.component = PanelViewShow
// break
// }
// },
refreshShare() {
this.showShare = false
this.$nextTick(() => (this.showShare = true))
2021-03-08 14:31:09 +08:00
}
}
2021-03-08 21:10:16 +08:00
}
2021-03-08 14:31:09 +08:00
</script>
<style scoped>
.ms-aside-container {
height: calc(100vh - 56px);
padding: 15px;
min-width: 260px;
max-width: 460px;
}
.ms-main-container {
height: calc(100vh - 56px);
}
</style>