refactor(仪表板): 导出视图图片在低分辨率屏幕上也可以到处高清图片
This commit is contained in:
parent
d66c0d7eff
commit
7561bf9944
@ -5,10 +5,15 @@
|
||||
>
|
||||
<de-main-container
|
||||
v-show="showChartCanvas"
|
||||
class=""
|
||||
v-loading="exportLoading"
|
||||
style="overflow: hidden"
|
||||
:element-loading-text="$t('panel.data_loading')"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(220,220,220,1)"
|
||||
>
|
||||
<div
|
||||
id="chartCanvas"
|
||||
:class="{'canvas-class-exporting':exporting}"
|
||||
class="canvas-class"
|
||||
:style="customStyle"
|
||||
>
|
||||
@ -119,7 +124,9 @@ export default {
|
||||
refId: null,
|
||||
element: {},
|
||||
lastMapChart: null,
|
||||
linkLoading: false
|
||||
linkLoading: false,
|
||||
exporting: false,
|
||||
exportLoading: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -255,7 +262,19 @@ export default {
|
||||
}
|
||||
},
|
||||
exportViewImg(callback) {
|
||||
exportImg(this.chart.name, callback)
|
||||
this.exportLoading = true
|
||||
this.$nextTick(() => {
|
||||
this.exporting = true
|
||||
setTimeout(() => {
|
||||
exportImg(this.chart.name, (params) => {
|
||||
this.exporting = false
|
||||
setTimeout(() => {
|
||||
this.exportLoading = false
|
||||
}, 500)
|
||||
callback(params)
|
||||
})
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
setLastMapChart(data) {
|
||||
this.lastMapChart = JSON.parse(JSON.stringify(data))
|
||||
@ -300,6 +319,10 @@ export default {
|
||||
height: 100%;
|
||||
background-size: 100% 100% !important;
|
||||
}
|
||||
.canvas-class-exporting {
|
||||
width: 1080px!important;
|
||||
height: 560px!important;
|
||||
}
|
||||
|
||||
.abs-container {
|
||||
position: absolute;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user