From 74a25cba524cb8a8c0bf4d48a8276137ce88b204 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 24 Jan 2024 11:53:24 +0800
Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E8=A7=86=E5=9B=BE=E5=AF=BC=E5=87=BA=E6=94=AF=E6=8C=81=E9=80=89?=
=?UTF-8?q?=E6=8B=A9=E5=88=86=E8=BE=A8=E7=8E=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../canvas/customComponent/UserView.vue | 83 ++++++++++++++++---
.../canvas/customComponent/UserViewDialog.vue | 34 ++++++--
2 files changed, 101 insertions(+), 16 deletions(-)
diff --git a/core/frontend/src/components/canvas/customComponent/UserView.vue b/core/frontend/src/components/canvas/customComponent/UserView.vue
index e24a7da4f5..76db594dc8 100644
--- a/core/frontend/src/components/canvas/customComponent/UserView.vue
+++ b/core/frontend/src/components/canvas/customComponent/UserView.vue
@@ -154,15 +154,39 @@
v-if="chartDetailsVisible"
style="position: absolute;right: 70px;top:15px"
>
-
- {{ $t('chart.export_img') }}
-
+
+
+ 导出分辨率
+
+
+
+
+
+
+
+ {{ $t('chart.export_img') }}
+
+
+
{
+ this.$refs['userViewDialog'].exportViewImg(this.pixel,() => {
this.imageDownloading = false
})
},
diff --git a/core/frontend/src/components/canvas/customComponent/UserViewDialog.vue b/core/frontend/src/components/canvas/customComponent/UserViewDialog.vue
index 52fdbf2d85..abde76c736 100644
--- a/core/frontend/src/components/canvas/customComponent/UserViewDialog.vue
+++ b/core/frontend/src/components/canvas/customComponent/UserViewDialog.vue
@@ -13,7 +13,6 @@
>
@@ -23,6 +22,7 @@
>
{
this.exporting = true
+ this.resizeChart()
setTimeout(() => {
exportImg(this.chart.name, (params) => {
this.exporting = false
+ this.resizeChart()
setTimeout(() => {
this.exportLoading = false
}, 500)
@@ -286,6 +303,13 @@ export default {
renderComponent() {
return this.chart.render
+ },
+ resizeChart() {
+ if (this.$refs[this.element.propValue.id]) {
+ this.chart.isPlugin
+ ? this.$refs[this.element.propValue.id].callPluginInner({ methodName: 'chartResize' })
+ : this.$refs[this.element.propValue.id].chartResize()
+ }
}
}
}
@@ -320,8 +344,8 @@ export default {
background-size: 100% 100% !important;
}
.canvas-class-exporting {
- width: 1080px!important;
- height: 560px!important;
+ width: 1980px!important;
+ height: 860px!important;
}
.abs-container {