Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
junjun 2022-08-19 10:06:51 +08:00
commit 5a8aa7f81d
2 changed files with 13 additions and 11 deletions

View File

@ -205,6 +205,8 @@ export default {
eventBus.$off('preview', this.preview) eventBus.$off('preview', this.preview)
eventBus.$off('save', this.save) eventBus.$off('save', this.save)
eventBus.$off('clearCanvas', this.clearCanvas) eventBus.$off('clearCanvas', this.clearCanvas)
clearInterval(this.timer)
this.timer = null
}, },
methods: { methods: {
close() { close() {

View File

@ -4,7 +4,7 @@
style="height: 100%;width: 100%;" style="height: 100%;width: 100%;"
:element-loading-text="$t('panel.data_loading')" :element-loading-text="$t('panel.data_loading')"
element-loading-spinner="el-icon-loading" element-loading-spinner="el-icon-loading"
element-loading-background="rgba(220,220,220, 1)" element-loading-background="rgba(220,220,220, 0.1)"
> >
<el-col v-if="panelInfo.name.length>0" class="panel-design"> <el-col v-if="panelInfo.name.length>0" class="panel-design">
@ -200,16 +200,9 @@ export default {
}, },
computed: { computed: {
imageWrapperStyle() { imageWrapperStyle() {
if (this.exporting) { return {
return { width: '100%',
width: '2560px', height: '100%'
height: '1440px'
}
} else {
return {
width: '100%',
height: '100%'
}
} }
}, },
showMainFlag() { showMainFlag() {
@ -357,6 +350,13 @@ export default {
downloadAsImage() { downloadAsImage() {
this.dataLoading = true this.dataLoading = true
setTimeout(() => { setTimeout(() => {
let svgElements = document.body.querySelectorAll('svg');
svgElements.forEach(function(item) {
item.setAttribute("width", 100);
item.setAttribute("height", 100);
item.style.width = null;
item.style.height= null;
});
this.exporting = true this.exporting = true
setTimeout(() => { setTimeout(() => {
const canvasID = document.getElementById('canvasInfoTemp') const canvasID = document.getElementById('canvasInfoTemp')