This commit is contained in:
liuye
2022-02-11 14:35:18 +08:00
parent 05c480cbf3
commit 9354b8e0f7

View File

@@ -53,7 +53,7 @@
<span class="label">网格管理员</span> <span class="label">网格管理员</span>
<span class="value" v-if="detailInfo.gird && detailInfo.gird.girdMemberNames && detailInfo.gird.girdMemberNames.length"> <span class="value" v-if="detailInfo.gird && detailInfo.gird.girdMemberNames && detailInfo.gird.girdMemberNames.length">
<span v-for="(item, index) in detailInfo.gird.girdMemberNames" :key="index"> <span v-for="(item, index) in detailInfo.gird.girdMemberNames" :key="index">
<span v-if="index>0">,</span><AiOpenData v-if="item" type="userName" :openid="item" style="display:inline-block;" /> <AiOpenData v-if="item" type="userName" :openid="item" style="display:inline-block;" /><span v-if="index<detailInfo.gird.girdMemberNames.length-1">,</span>
</span> </span>
</span> </span>
</div> </div>
@@ -95,7 +95,7 @@
<span class="label">网格管理员</span> <span class="label">网格管理员</span>
<span class="value"> <span class="value">
<span v-for="(item, index) in building.girdMemberNames" :key="index"> <span v-for="(item, index) in building.girdMemberNames" :key="index">
<span v-if="index>0">,</span><AiOpenData v-if="item" type="userName" :openid="item" style="display:inline-block;" /> <AiOpenData v-if="item" type="userName" :openid="item" style="display:inline-block;" /><span v-if="index<building.girdMemberNames.length-1">,</span>
</span> </span>
</span> </span>
</div> </div>
@@ -177,10 +177,6 @@ export default {
}, },
getMarkerCluster(points, count = 0) { getMarkerCluster(points, count = 0) {
let {lib: TMap, map} = this let {lib: TMap, map} = this
console.log(points)
if(!points.length) {
return
}
if (map) { if (map) {
// map.setCenter(this.config.latlng) // map.setCenter(this.config.latlng)
let MarkerCluster = new TMap.MarkerCluster({ let MarkerCluster = new TMap.MarkerCluster({
@@ -319,19 +315,16 @@ export default {
if (res.code == 0 && res.data.length) { if (res.code == 0 && res.data.length) {
this.show = true this.show = true
this.buildList = res.data this.buildList = res.data
const points = [] const points = res.data.map(item => {
res.data.map(item => {
if(item.lng && item.lat) { if(item.lng && item.lat) {
points.push( return {
{ lnglat: [item.lng, item.lat],
lnglat: [item.lng, item.lat], id: item.id,
id: item.id, corpId: item.corpId,
corpId: item.corpId, areaName: item.areaName,
areaName: item.areaName, buildingNumber: item.name || item.buildingNumber,
buildingNumber: item.name || item.buildingNumber, communityName: item.name || item.communityName,
communityName: item.name || item.communityName, }
}
)
} }
}) })
this.getMarkerCluster(points) this.getMarkerCluster(points)