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: {