Merge pull request #972 from dataease/pr@dev@refactor_panel-view
refactor:仪表板视图详情背景优化,跟随仪表板背景
This commit is contained in:
commit
e22e9ae3f4
@ -17,7 +17,6 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<el-tooltip :content="$t('panel.fontSize')">
|
<el-tooltip :content="$t('panel.fontSize')">
|
||||||
|
|
||||||
<i style="float: left;margin-top: 3px;margin-left: 2px;" class="iconfont icon-font_size" />
|
<i style="float: left;margin-top: 3px;margin-left: 2px;" class="iconfont icon-font_size" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -123,6 +122,17 @@ export default {
|
|||||||
tooltip: this.$t('panel.text_align_right'),
|
tooltip: this.$t('panel.text_align_right'),
|
||||||
label: 'right'
|
label: 'right'
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
'v-text': [
|
||||||
|
'textAlign',
|
||||||
|
'fontSize',
|
||||||
|
'fontWeight',
|
||||||
|
'letterSpacing',
|
||||||
|
'opacity',
|
||||||
|
'borderRadius',
|
||||||
|
'color',
|
||||||
|
'backgroundColor',
|
||||||
|
'hyperlinks'
|
||||||
] }
|
] }
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -140,6 +150,9 @@ export default {
|
|||||||
// console.log('mainWidthOffset:' + this.mainWidthOffset)
|
// console.log('mainWidthOffset:' + this.mainWidthOffset)
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
attrShow(attr) {
|
||||||
|
return style
|
||||||
|
},
|
||||||
letterDivColor() {
|
letterDivColor() {
|
||||||
const style = {
|
const style = {
|
||||||
height: '2px',
|
height: '2px',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container>
|
<de-container>
|
||||||
<de-aside-container v-if="!chart.type.includes('table')">
|
<de-aside-container v-if="!chart.type.includes('table')" :style="customStyle">
|
||||||
<chart-component v-if="!chart.type.includes('text')" class="chart-class" :chart="chart" />
|
<chart-component v-if="!chart.type.includes('text')" class="chart-class" :chart="chart" />
|
||||||
<label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" />
|
<label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" />
|
||||||
</de-aside-container>
|
</de-aside-container>
|
||||||
@ -19,6 +19,7 @@ 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 DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
||||||
import { export_json_to_excel } from '@/plugins/Export2Excel'
|
import { export_json_to_excel } from '@/plugins/Export2Excel'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserView',
|
name: 'UserView',
|
||||||
@ -38,6 +39,32 @@ export default {
|
|||||||
refId: null
|
refId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
customStyle() {
|
||||||
|
let style = {
|
||||||
|
}
|
||||||
|
if (this.canvasStyleData.openCommonStyle) {
|
||||||
|
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
|
||||||
|
style = {
|
||||||
|
background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`,
|
||||||
|
...style
|
||||||
|
}
|
||||||
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
|
style = {
|
||||||
|
background: this.canvasStyleData.panel.color,
|
||||||
|
...style
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return style
|
||||||
|
},
|
||||||
|
...mapState([
|
||||||
|
'isClickComponent',
|
||||||
|
'curComponent',
|
||||||
|
'componentData',
|
||||||
|
'canvasStyleData'
|
||||||
|
])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)
|
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user