This commit is contained in:
yanran200730
2022-06-22 10:53:36 +08:00
parent 98762e996c
commit e7e69d72e3
2 changed files with 14 additions and 6 deletions

View File

@@ -178,10 +178,15 @@ export default {
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
values() {
return this.data?.[this.data.dataType]?.map(e => { values () {
if (!this.data) {
return []
}
return this.data.type ==='map' ? this.data[this.data.dataType].map(e => {
return {...e, lng: e['经度'], lat: e['纬度'], label: e['地区名称']} return {...e, lng: e['经度'], lat: e['纬度'], label: e['地区名称']}
}) || [] }) : this.data[this.data.dataType]
} }
}, },
methods: { methods: {

View File

@@ -537,7 +537,10 @@ const components = [
{ {
content: '中卫慧通', content: '中卫慧通',
lng: 117.1339399, lng: 117.1339399,
lat: 36.7190487 lat: 36.7190487,
地区: '中卫慧通',
经度: 117.1339399,
纬度: 36.7190487
} }
], ],
api: '', api: '',
@@ -613,11 +616,11 @@ const components = [
dataType: 'staticData', dataType: 'staticData',
staticData: [ staticData: [
{ {
key: '个人服务办理', label: '个人服务办理',
value: 247 value: 247
}, },
{ {
key: '同比上月', label: '同比上月',
value: 247 value: 247
} }
] ]