|
|
|
@ -13,14 +13,7 @@
|
|
|
|
|
<div
|
|
|
|
|
v-for="chart in chartList"
|
|
|
|
|
:key="chart.code"
|
|
|
|
|
:style="{
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
width: chart.w + 'px',
|
|
|
|
|
height: chart.h + 'px',
|
|
|
|
|
left: chart.x + 'px',
|
|
|
|
|
top: chart.y + 'px',
|
|
|
|
|
zIndex: chart.z || 0
|
|
|
|
|
}"
|
|
|
|
|
:style="getStyle(chart)"
|
|
|
|
|
>
|
|
|
|
|
<Configuration
|
|
|
|
|
:config="chart"
|
|
|
|
@ -181,6 +174,28 @@ export default {
|
|
|
|
|
'changePageConfig',
|
|
|
|
|
'changeChartConfig'
|
|
|
|
|
]),
|
|
|
|
|
getStyle (chart) {
|
|
|
|
|
if (chart.perspective > 0) {
|
|
|
|
|
return {
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
width: chart.w + 'px',
|
|
|
|
|
height: chart.h + 'px',
|
|
|
|
|
left: chart.x + 'px',
|
|
|
|
|
top: chart.y + 'px',
|
|
|
|
|
transform: `perspective(${chart.perspective}px) skew(${chart.skewX}deg, ${chart.skewY}deg) rotateX(${chart.rotateX}deg) rotateY(${chart.rotateY}deg) rotateZ(${chart.rotateZ}deg)`,
|
|
|
|
|
zIndex: chart.z || 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
width: chart.w + 'px',
|
|
|
|
|
height: chart.h + 'px',
|
|
|
|
|
left: chart.x + 'px',
|
|
|
|
|
top: chart.y + 'px',
|
|
|
|
|
transform: `skew(${chart.skewX}deg, ${chart.skewY}deg) rotateX(${chart.rotateX}deg) rotateY(${chart.rotateY}deg) rotateZ(${chart.rotateZ}deg)`,
|
|
|
|
|
zIndex: chart.z || 0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 右键点击查看数据
|
|
|
|
|
openDataViewDialog (config) {
|
|
|
|
|
this.$refs.dataViewDialog.init(config)
|
|
|
|
|