forked from github/dataease
feat:画布切换修改
This commit is contained in:
parent
10feea18a9
commit
2d7ad3224b
@ -1,92 +1,96 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contextmenu" v-show="menuShow" :style="{ top: menuTop + 'px', left: menuLeft + 'px' }">
|
<div v-show="menuShow" class="contextmenu" :style="{ top: menuTop + 'px', left: menuLeft + 'px' }">
|
||||||
<ul @mouseup="handleMouseUp">
|
<ul @mouseup="handleMouseUp">
|
||||||
<template v-if="curComponent">
|
<template v-if="curComponent">
|
||||||
<template v-if="!curComponent.isLock">
|
<template v-if="!curComponent.isLock">
|
||||||
<li @click="copy">复制</li>
|
<li @click="edit">编辑</li>
|
||||||
<li @click="paste">粘贴</li>
|
<li @click="copy">复制</li>
|
||||||
<li @click="cut">剪切</li>
|
<li @click="paste">粘贴</li>
|
||||||
<li @click="deleteComponent">删除</li>
|
<li @click="cut">剪切</li>
|
||||||
<li @click="lock">锁定</li>
|
<li @click="deleteComponent">删除</li>
|
||||||
<li @click="topComponent">置顶</li>
|
<li @click="lock">锁定</li>
|
||||||
<li @click="bottomComponent">置底</li>
|
<li @click="topComponent">置顶</li>
|
||||||
<li @click="upComponent">上移</li>
|
<li @click="bottomComponent">置底</li>
|
||||||
<li @click="downComponent">下移</li>
|
<li @click="upComponent">上移</li>
|
||||||
</template>
|
<li @click="downComponent">下移</li>
|
||||||
<li v-else @click="unlock">解锁</li>
|
</template>
|
||||||
</template>
|
<li v-else @click="unlock">解锁</li>
|
||||||
<li v-else @click="paste">粘贴</li>
|
</template>
|
||||||
</ul>
|
<li v-else @click="paste">粘贴</li>
|
||||||
</div>
|
</ul>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
copyData: null,
|
copyData: null
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: mapState([
|
||||||
|
'menuTop',
|
||||||
|
'menuLeft',
|
||||||
|
'menuShow',
|
||||||
|
'curComponent'
|
||||||
|
]),
|
||||||
|
methods: {
|
||||||
|
edit() {
|
||||||
|
// 编辑组件
|
||||||
},
|
},
|
||||||
computed: mapState([
|
lock() {
|
||||||
'menuTop',
|
this.$store.commit('lock')
|
||||||
'menuLeft',
|
|
||||||
'menuShow',
|
|
||||||
'curComponent',
|
|
||||||
]),
|
|
||||||
methods: {
|
|
||||||
lock() {
|
|
||||||
this.$store.commit('lock')
|
|
||||||
},
|
|
||||||
|
|
||||||
unlock() {
|
|
||||||
this.$store.commit('unlock')
|
|
||||||
},
|
|
||||||
|
|
||||||
// 点击菜单时不取消当前组件的选中状态
|
|
||||||
handleMouseUp() {
|
|
||||||
this.$store.commit('setClickComponentStatus', true)
|
|
||||||
},
|
|
||||||
|
|
||||||
cut() {
|
|
||||||
this.$store.commit('cut')
|
|
||||||
},
|
|
||||||
|
|
||||||
copy() {
|
|
||||||
this.$store.commit('copy')
|
|
||||||
},
|
|
||||||
|
|
||||||
paste() {
|
|
||||||
this.$store.commit('paste', true)
|
|
||||||
this.$store.commit('recordSnapshot')
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteComponent() {
|
|
||||||
this.$store.commit('deleteComponent')
|
|
||||||
this.$store.commit('recordSnapshot')
|
|
||||||
},
|
|
||||||
|
|
||||||
upComponent() {
|
|
||||||
this.$store.commit('upComponent')
|
|
||||||
this.$store.commit('recordSnapshot')
|
|
||||||
},
|
|
||||||
|
|
||||||
downComponent() {
|
|
||||||
this.$store.commit('downComponent')
|
|
||||||
this.$store.commit('recordSnapshot')
|
|
||||||
},
|
|
||||||
|
|
||||||
topComponent() {
|
|
||||||
this.$store.commit('topComponent')
|
|
||||||
this.$store.commit('recordSnapshot')
|
|
||||||
},
|
|
||||||
|
|
||||||
bottomComponent() {
|
|
||||||
this.$store.commit('bottomComponent')
|
|
||||||
this.$store.commit('recordSnapshot')
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
unlock() {
|
||||||
|
this.$store.commit('unlock')
|
||||||
|
},
|
||||||
|
|
||||||
|
// 点击菜单时不取消当前组件的选中状态
|
||||||
|
handleMouseUp() {
|
||||||
|
this.$store.commit('setClickComponentStatus', true)
|
||||||
|
},
|
||||||
|
|
||||||
|
cut() {
|
||||||
|
this.$store.commit('cut')
|
||||||
|
},
|
||||||
|
|
||||||
|
copy() {
|
||||||
|
this.$store.commit('copy')
|
||||||
|
},
|
||||||
|
|
||||||
|
paste() {
|
||||||
|
this.$store.commit('paste', true)
|
||||||
|
this.$store.commit('recordSnapshot')
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteComponent() {
|
||||||
|
this.$store.commit('deleteComponent')
|
||||||
|
this.$store.commit('recordSnapshot')
|
||||||
|
},
|
||||||
|
|
||||||
|
upComponent() {
|
||||||
|
this.$store.commit('upComponent')
|
||||||
|
this.$store.commit('recordSnapshot')
|
||||||
|
},
|
||||||
|
|
||||||
|
downComponent() {
|
||||||
|
this.$store.commit('downComponent')
|
||||||
|
this.$store.commit('recordSnapshot')
|
||||||
|
},
|
||||||
|
|
||||||
|
topComponent() {
|
||||||
|
this.$store.commit('topComponent')
|
||||||
|
this.$store.commit('recordSnapshot')
|
||||||
|
},
|
||||||
|
|
||||||
|
bottomComponent() {
|
||||||
|
this.$store.commit('bottomComponent')
|
||||||
|
this.$store.commit('recordSnapshot')
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -123,4 +127,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
<div class="shape" :class="classInfo" @mouseenter="enter" @mouseleave="leave" @click="selectCurComponent" @mousedown="handleMouseDownOnShape">
|
<div class="shape" :class="classInfo" @mouseenter="enter" @mouseleave="leave" @click="selectCurComponent" @mousedown="handleMouseDownOnShape">
|
||||||
<span v-show="isActive()" class="iconfont icon-xiangyouxuanzhuan" @mousedown="handleRotate" />
|
<span v-show="isActive()" class="iconfont icon-xiangyouxuanzhuan" @mousedown="handleRotate" />
|
||||||
<span v-show="element.isLock" class="iconfont icon-suo" />
|
<span v-show="element.isLock" class="iconfont icon-suo" />
|
||||||
|
|
||||||
|
<!-- <span v-show="isActive()" class="iconfont icon-more">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- icon="el-icon-more"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </span>-->
|
||||||
<div
|
<div
|
||||||
v-for="item in (isActive()? pointList : [])"
|
v-for="item in (isActive()? pointList : [])"
|
||||||
:key="item"
|
:key="item"
|
||||||
@ -404,4 +412,17 @@ export default {
|
|||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edit-side {
|
||||||
|
overflow: hidden auto;
|
||||||
|
min-height: 24px;
|
||||||
|
padding-top: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-more {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: -10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -31,6 +31,12 @@
|
|||||||
<el-tooltip content="预览">
|
<el-tooltip content="预览">
|
||||||
<el-button class="el-icon-view" size="mini" circle @click="preview" />
|
<el-button class="el-icon-view" size="mini" circle @click="preview" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
|
<span style="float: right;margin-left: 10px">
|
||||||
|
<el-button size="mini" @click="closePanelEdit">
|
||||||
|
关闭
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 预览 -->
|
<!-- 预览 -->
|
||||||
@ -46,6 +52,7 @@ import { commonStyle, commonAttr } from '@/components/canvas/custom-component/co
|
|||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||||
import { post } from '@/api/panel/panel'
|
import { post } from '@/api/panel/panel'
|
||||||
|
import bus from '@/utils/bus'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -77,6 +84,10 @@ export default {
|
|||||||
this.scale = this.canvasStyleData.scale
|
this.scale = this.canvasStyleData.scale
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
closePanelEdit() {
|
||||||
|
debugger
|
||||||
|
bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
|
||||||
|
},
|
||||||
goFile() {
|
goFile() {
|
||||||
this.$refs.files.click()
|
this.$refs.files.click()
|
||||||
},
|
},
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</de-main-container>
|
</de-main-container>
|
||||||
</de-container>
|
</de-container>
|
||||||
|
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -94,6 +95,7 @@ import 'element-ui/lib/theme-chalk/index.css'
|
|||||||
import '@/components/canvas/styles/reset.css'
|
import '@/components/canvas/styles/reset.css'
|
||||||
import { ApplicationContext } from '@/utils/ApplicationContext'
|
import { ApplicationContext } from '@/utils/ApplicationContext'
|
||||||
export default {
|
export default {
|
||||||
|
name: 'PanelEdit',
|
||||||
components: {
|
components: {
|
||||||
DeMainContainer,
|
DeMainContainer,
|
||||||
DeContainer,
|
DeContainer,
|
||||||
@ -102,11 +104,11 @@ export default {
|
|||||||
ViewSelect,
|
ViewSelect,
|
||||||
Editor,
|
Editor,
|
||||||
Toolbar
|
Toolbar
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
|
editView: false,
|
||||||
clickNotClose: false,
|
clickNotClose: false,
|
||||||
showIndex: -1,
|
showIndex: -1,
|
||||||
activeName: 'attr',
|
activeName: 'attr',
|
||||||
|
@ -1,25 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container>
|
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
||||||
|
|
||||||
<de-aside-container>
|
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
||||||
<el-tab-pane name="PanelList">
|
|
||||||
<span slot="label"><i class="el-icon-document" />列表</span>
|
|
||||||
<panel-list />
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane name="panels_star">
|
|
||||||
<span slot="label"><i class="el-icon-star-off" />收藏</span>
|
|
||||||
开发中...
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane name="panels_share" :lazy="true">
|
|
||||||
<span slot="label"><i class="el-icon-share" />分享</span>
|
|
||||||
<share-tree v-if="showShare" />
|
|
||||||
</el-tab-pane>
|
|
||||||
|
|
||||||
</el-tabs>
|
|
||||||
|
|
||||||
</de-aside-container>
|
|
||||||
|
|
||||||
<de-main-container>
|
<de-main-container>
|
||||||
<component :is="component" :param="param" />
|
<component :is="component" :param="param" />
|
||||||
</de-main-container>
|
</de-main-container>
|
||||||
@ -27,45 +7,42 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import bus from '@/utils/bus'
|
||||||
import DeMainContainer from '@/components/dataease/DeMainContainer'
|
import DeMainContainer from '@/components/dataease/DeMainContainer'
|
||||||
import DeContainer from '@/components/dataease/DeContainer'
|
import DeContainer from '@/components/dataease/DeContainer'
|
||||||
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
import PanelMain from '@/views/panel/list/PanelMain'
|
||||||
// import Group from './group/Group'
|
import ChartEdit from '@/views/chart/view/ChartEdit'
|
||||||
import PanelList from './list/PanelList'
|
import PanelEdit from '@/views/panel/edit'
|
||||||
import PanelViewShow from './list/PanelViewShow'
|
|
||||||
import ShareTree from './GrantAuth/shareTree'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Panel',
|
name: 'Panel',
|
||||||
components: { DeMainContainer, DeContainer, DeAsideContainer, PanelList, PanelViewShow, ShareTree },
|
components: { DeMainContainer, DeContainer, PanelMain, ChartEdit, PanelEdit },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: PanelViewShow,
|
component: PanelMain,
|
||||||
param: {},
|
param: {}
|
||||||
activeName: 'PanelList',
|
|
||||||
showShare: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
mounted() {
|
||||||
handleClick(tab, event) {
|
bus.$on('PanelSwitchComponent', (c) => {
|
||||||
// 点击分析面板需要刷新分享内容
|
debugger
|
||||||
if (tab.name === 'panels_share') {
|
console.log(c)
|
||||||
this.refreshShare()
|
this.param = c.param
|
||||||
|
switch (c.name) {
|
||||||
|
case 'PanelEdit':
|
||||||
|
this.component = PanelEdit
|
||||||
|
break
|
||||||
|
case 'ChartEdit':
|
||||||
|
this.component = ChartEdit
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
this.component = PanelMain
|
||||||
|
break
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
// switchComponent(c) {
|
},
|
||||||
// console.log(c)
|
methods: {
|
||||||
// this.param = c.param
|
|
||||||
// switch (c.name) {
|
|
||||||
// case 'PanelViewShow':
|
|
||||||
// this.component = PanelViewShow
|
|
||||||
// break
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
refreshShare() {
|
|
||||||
this.showShare = false
|
|
||||||
this.$nextTick(() => (this.showShare = true))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -80,6 +57,7 @@ export default {
|
|||||||
|
|
||||||
.ms-main-container {
|
.ms-main-container {
|
||||||
height: calc(100vh - 56px);
|
height: calc(100vh - 56px);
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
156
frontend/src/views/panel/list/ChartViewEdit.vue
Normal file
156
frontend/src/views/panel/list/ChartViewEdit.vue
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
<template>
|
||||||
|
<el-row style="height: 100%;overflow-y: hidden;width: 100%;">
|
||||||
|
<el-row style="display: flex;height: 100%">
|
||||||
|
|
||||||
|
<el-col class="panel-design">
|
||||||
|
<!--TODO 仪表盘设计公共设置区域-->
|
||||||
|
<el-row class="panel-design-head">
|
||||||
|
<span style="float: left;line-height: 40px; color: gray">
|
||||||
|
<span>名称:{{ panelInfo.name || '测试仪表板' }}</span>
|
||||||
|
</span>
|
||||||
|
<span style="float: right;line-height: 40px;">
|
||||||
|
<el-tooltip content="预览">
|
||||||
|
<el-button class="el-icon-view" size="mini" circle />
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
|
</el-row>
|
||||||
|
<!--TODO 仪表盘预览区域-->
|
||||||
|
<section>
|
||||||
|
<Preview />
|
||||||
|
</section>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import ChartEdit from '@/views/chart/view/ChartEdit'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ChartViewEdit',
|
||||||
|
components: { ChartEdit },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
panelInfo() {
|
||||||
|
return this.$store.state.panel.panelInfo
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.view-list {
|
||||||
|
height: 100%;
|
||||||
|
width: 20%;
|
||||||
|
min-width: 180px;
|
||||||
|
max-width: 220px;
|
||||||
|
border: 1px solid #E6E6E6;
|
||||||
|
border-left: 0 solid;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-list-thumbnails-outline {
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-list-thumbnails {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0px 15px 15px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-design {
|
||||||
|
height: 100%;
|
||||||
|
min-width: 500px;
|
||||||
|
border-top: 1px solid #E6E6E6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-design-head {
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-design-show {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #E6E6E6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.padding-lr {
|
||||||
|
padding: 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itxst {
|
||||||
|
margin: 10px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col {
|
||||||
|
width: 40%;
|
||||||
|
flex: 1;
|
||||||
|
padding: 10px;
|
||||||
|
border: solid 1px #eee;
|
||||||
|
border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col + .col {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 2px 12px;
|
||||||
|
margin: 3px 3px 0 3px;
|
||||||
|
border: solid 1px #eee;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
text-align: left;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item + .item {
|
||||||
|
border-top: none;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item:hover {
|
||||||
|
background-color: #fdfdfd;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-axis {
|
||||||
|
padding: 2px 12px;
|
||||||
|
margin: 3px 3px 0 3px;
|
||||||
|
border: solid 1px #eee;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-axis:hover {
|
||||||
|
background-color: #fdfdfd;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 600px;
|
||||||
|
border: 1px solid #000;
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -519,7 +519,7 @@ export default {
|
|||||||
},
|
},
|
||||||
edit(data) {
|
edit(data) {
|
||||||
this.$store.dispatch('panel/setPanelInfo', data)
|
this.$store.dispatch('panel/setPanelInfo', data)
|
||||||
this.$router.replace('/panelEdit')
|
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
|
||||||
},
|
},
|
||||||
link(data) {
|
link(data) {
|
||||||
this.linkVisible = true
|
this.linkVisible = true
|
||||||
|
68
frontend/src/views/panel/list/PanelMain.vue
Normal file
68
frontend/src/views/panel/list/PanelMain.vue
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<de-container>
|
||||||
|
<de-aside-container>
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane name="PanelList">
|
||||||
|
<span slot="label"><i class="el-icon-document" />列表</span>
|
||||||
|
<panel-list />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane name="panels_star">
|
||||||
|
<span slot="label"><i class="el-icon-star-off" />收藏</span>
|
||||||
|
开发中...
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane name="panels_share" :lazy="true">
|
||||||
|
<span slot="label"><i class="el-icon-share" />分享</span>
|
||||||
|
<share-tree v-if="showShare" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</de-aside-container>
|
||||||
|
<de-main-container>
|
||||||
|
<PanelViewShow />
|
||||||
|
</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'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PanelMain',
|
||||||
|
components: { DeMainContainer, DeContainer, DeAsideContainer, PanelList, PanelViewShow, ShareTree },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'PanelList',
|
||||||
|
showShare: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick(tab, event) {
|
||||||
|
// 点击分析面板需要刷新分享内容
|
||||||
|
if (tab.name === 'panels_share') {
|
||||||
|
this.refreshShare()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refreshShare() {
|
||||||
|
this.showShare = false
|
||||||
|
this.$nextTick(() => (this.showShare = true))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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>
|
Loading…
Reference in New Issue
Block a user