From 9a66a5861e0daed0a4dd2ae141ab5d97234f4e92 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 15 Apr 2022 11:07:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E8=A7=86=E5=9B=BE=E4=B8=8D=E8=83=BD=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/UserViewDialog.vue | 22 +++++++++------- .../custom-component/UserViewMobileDialog.vue | 25 +++++++++++-------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserViewDialog.vue b/frontend/src/components/canvas/custom-component/UserViewDialog.vue index b84898e7b3..55f87f758b 100644 --- a/frontend/src/components/canvas/custom-component/UserViewDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewDialog.vue @@ -41,7 +41,6 @@ import { exportDetails } from '@/api/panel/panel' import html2canvas from 'html2canvasde' import { hexColorToRGBA } from '@/views/chart/chart/util' import { deepCopy } from '@/components/canvas/utils/utils' -import { get } from '@/api/system/dynamic' export default { name: 'UserView', components: { LabelNormalText, ChartComponentS2, ChartComponentG2, DeMainContainer, DeContainer, DeAsideContainer, ChartComponent, TableNormal, LabelNormal, PluginCom }, @@ -62,13 +61,7 @@ export default { } }, computed: { - mapChart() { - if (this.chart.type && (this.chart.type === 'map' || this.chart.type === 'buddle-map')) { - const temp = JSON.parse(JSON.stringify(this.chart)) - return { ...temp, ...{ DetailAreaCode: this.curComponent.DetailAreaCode }} - } - return null - }, + showChartCanvas() { return !this.chart.type.includes('table') }, @@ -117,7 +110,18 @@ export default { 'curComponent', 'componentData', 'canvasStyleData' - ]) + ]), + mapChart() { + if (this.chart.type && (this.chart.type === 'map' || this.chart.type === 'buddle-map')) { + const temp = JSON.parse(JSON.stringify(this.chart)) + let DetailAreaCode = null + if (this.curComponent && this.curComponent.DetailAreaCode && this.curComponent.DetailAreaCode.length) { + DetailAreaCode = this.curComponent.DetailAreaCode + } + return { ...temp, ...{ DetailAreaCode: DetailAreaCode }} + } + return null + } }, mounted() { this.element = deepCopy(this.curComponent) diff --git a/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue b/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue index eb4a70de29..d57297fd04 100644 --- a/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue @@ -30,10 +30,10 @@ import DeMainContainer from '@/components/dataease/DeMainContainer' import DeContainer from '@/components/dataease/DeContainer' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' - +import PluginCom from '@/views/system/plugin/PluginCom' export default { name: 'UserViewMobileDialog', - components: { ChartComponentS2, LabelNormalText, DeContainer, DeMainContainer, ChartComponentG2, ChartComponent, TableNormal, LabelNormal }, + components: { ChartComponentS2, LabelNormalText, DeContainer, DeMainContainer, ChartComponentG2, ChartComponent, TableNormal, LabelNormal, PluginCom }, props: { chart: { type: Object, @@ -50,13 +50,7 @@ export default { } }, computed: { - mapChart() { - if (this.chart.type && (this.chart.type === 'map' || this.chart.type === 'buddle-map')) { - const temp = JSON.parse(JSON.stringify(this.chart)) - return { ...temp, ...{ DetailAreaCode: this.curComponent.DetailAreaCode }} - } - return null - }, + customStyle() { let style = { } @@ -83,7 +77,18 @@ export default { 'curComponent', 'componentData', 'canvasStyleData' - ]) + ]), + mapChart() { + if (this.chart.type && (this.chart.type === 'map' || this.chart.type === 'buddle-map')) { + const temp = JSON.parse(JSON.stringify(this.chart)) + let DetailAreaCode = null + if (this.curComponent && this.curComponent.DetailAreaCode && this.curComponent.DetailAreaCode.length) { + DetailAreaCode = this.curComponent.DetailAreaCode + } + return { ...temp, ...{ DetailAreaCode: DetailAreaCode }} + } + return null + } }, methods: {