Unverified 提交 05ea4148 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw 提交者: GitHub

Merge pull request #2120 from dataease/pr@dev@fix_mobile_bubble_map_detail

fix: 移动端插件视图不能查看详情
...@@ -41,7 +41,6 @@ import { exportDetails } from '@/api/panel/panel' ...@@ -41,7 +41,6 @@ import { exportDetails } from '@/api/panel/panel'
import html2canvas from 'html2canvasde' import html2canvas from 'html2canvasde'
import { hexColorToRGBA } from '@/views/chart/chart/util' import { hexColorToRGBA } from '@/views/chart/chart/util'
import { deepCopy } from '@/components/canvas/utils/utils' import { deepCopy } from '@/components/canvas/utils/utils'
import { get } from '@/api/system/dynamic'
export default { export default {
name: 'UserView', name: 'UserView',
components: { LabelNormalText, ChartComponentS2, ChartComponentG2, DeMainContainer, DeContainer, DeAsideContainer, ChartComponent, TableNormal, LabelNormal, PluginCom }, components: { LabelNormalText, ChartComponentS2, ChartComponentG2, DeMainContainer, DeContainer, DeAsideContainer, ChartComponent, TableNormal, LabelNormal, PluginCom },
...@@ -62,13 +61,7 @@ export default { ...@@ -62,13 +61,7 @@ export default {
} }
}, },
computed: { 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() { showChartCanvas() {
return !this.chart.type.includes('table') return !this.chart.type.includes('table')
}, },
...@@ -117,7 +110,18 @@ export default { ...@@ -117,7 +110,18 @@ export default {
'curComponent', 'curComponent',
'componentData', 'componentData',
'canvasStyleData' '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() { mounted() {
this.element = deepCopy(this.curComponent) this.element = deepCopy(this.curComponent)
......
...@@ -30,10 +30,10 @@ import DeMainContainer from '@/components/dataease/DeMainContainer' ...@@ -30,10 +30,10 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer' import DeContainer from '@/components/dataease/DeContainer'
import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText'
import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' import ChartComponentS2 from '@/views/chart/components/ChartComponentS2'
import PluginCom from '@/views/system/plugin/PluginCom'
export default { export default {
name: 'UserViewMobileDialog', name: 'UserViewMobileDialog',
components: { ChartComponentS2, LabelNormalText, DeContainer, DeMainContainer, ChartComponentG2, ChartComponent, TableNormal, LabelNormal }, components: { ChartComponentS2, LabelNormalText, DeContainer, DeMainContainer, ChartComponentG2, ChartComponent, TableNormal, LabelNormal, PluginCom },
props: { props: {
chart: { chart: {
type: Object, type: Object,
...@@ -50,13 +50,7 @@ export default { ...@@ -50,13 +50,7 @@ export default {
} }
}, },
computed: { 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() { customStyle() {
let style = { let style = {
} }
...@@ -83,7 +77,18 @@ export default { ...@@ -83,7 +77,18 @@ export default {
'curComponent', 'curComponent',
'componentData', 'componentData',
'canvasStyleData' '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: { methods: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论