2021-03-12 16:08:55 +08:00
|
|
|
|
<template>
|
|
|
|
|
<el-row style="height: 100%;overflow-y: hidden;width: 100%;">
|
|
|
|
|
<el-row style="display: flex;height: 100%">
|
|
|
|
|
|
|
|
|
|
<el-col class="panel-design">
|
2021-03-16 11:38:20 +08:00
|
|
|
|
<!--TODO 仪表盘设计公共设置区域-->
|
|
|
|
|
<el-row class="panel-design-head">
|
2021-03-22 19:05:35 +08:00
|
|
|
|
<span style="float: left;line-height: 40px; color: gray">
|
|
|
|
|
<span>名称:{{ panelInfo.name || '测试仪表板' }}</span>
|
|
|
|
|
</span>
|
2021-03-16 12:02:30 +08:00
|
|
|
|
<span style="float: right;line-height: 40px;">
|
2021-03-22 19:05:35 +08:00
|
|
|
|
<el-tooltip content="预览">
|
2021-04-06 15:07:13 +08:00
|
|
|
|
<el-button class="el-icon-view" size="mini" circle @click="clickPreview" />
|
2021-03-22 19:05:35 +08:00
|
|
|
|
</el-tooltip>
|
2021-03-16 12:02:30 +08:00
|
|
|
|
</span>
|
2021-03-16 11:38:20 +08:00
|
|
|
|
</el-row>
|
2021-03-29 14:57:04 +08:00
|
|
|
|
<!--TODO 仪表盘预览区域-->
|
2021-04-01 11:38:30 +08:00
|
|
|
|
<section>
|
|
|
|
|
<Preview />
|
|
|
|
|
</section>
|
2021-03-23 17:16:51 +08:00
|
|
|
|
</el-col>
|
2021-03-12 16:08:55 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
</el-row>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2021-03-30 15:38:32 +08:00
|
|
|
|
import Preview from '@/components/canvas/components/Editor/Preview'
|
2021-04-06 15:07:13 +08:00
|
|
|
|
import { mapState } from 'vuex'
|
2021-03-19 17:06:52 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'PanelViewShow',
|
2021-03-29 14:57:04 +08:00
|
|
|
|
components: { Preview },
|
2021-03-19 17:06:52 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
2021-03-23 17:16:51 +08:00
|
|
|
|
|
2021-03-19 17:06:52 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
panelInfo() {
|
|
|
|
|
return this.$store.state.panel.panelInfo
|
2021-04-06 15:07:13 +08:00
|
|
|
|
},
|
|
|
|
|
...mapState([
|
|
|
|
|
'componentData',
|
|
|
|
|
'canvasStyleData'
|
|
|
|
|
])
|
2021-04-01 11:38:30 +08:00
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
|
2021-03-19 17:06:52 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-04-06 15:07:13 +08:00
|
|
|
|
clickPreview() {
|
|
|
|
|
localStorage.setItem('canvasData', JSON.stringify(this.componentData))
|
|
|
|
|
localStorage.setItem('canvasStyle', JSON.stringify(this.canvasStyleData))
|
|
|
|
|
const url = '#/preview'
|
|
|
|
|
window.open(url, '_blank')
|
|
|
|
|
}
|
2021-03-19 17:06:52 +08:00
|
|
|
|
|
2021-03-12 16:08:55 +08:00
|
|
|
|
}
|
2021-03-19 17:06:52 +08:00
|
|
|
|
}
|
2021-03-12 16:08:55 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.view-list {
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 20%;
|
|
|
|
|
min-width: 180px;
|
2021-03-16 11:38:20 +08:00
|
|
|
|
max-width: 220px;
|
2021-03-12 16:08:55 +08:00
|
|
|
|
border: 1px solid #E6E6E6;
|
|
|
|
|
border-left: 0 solid;
|
2021-03-16 11:38:20 +08:00
|
|
|
|
overflow-y: auto;
|
2021-03-12 16:08:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.view-list-thumbnails-outline {
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
2021-03-16 11:38:20 +08:00
|
|
|
|
|
2021-03-12 16:08:55 +08:00
|
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-16 11:38:20 +08:00
|
|
|
|
.container {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 600px;
|
|
|
|
|
border: 1px solid #000;
|
|
|
|
|
position: relative;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-12 16:08:55 +08:00
|
|
|
|
span {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|