BUG 30095
This commit is contained in:
@@ -86,7 +86,8 @@
|
||||
<!-- </div>-->
|
||||
<div class="community-btn">
|
||||
<el-button icon="iconfont iconloudongmoxing" size="small"
|
||||
@click="$router.push({query: {communityId: info.communityId, buildingId: info.id,unitNum:house ? house.unitNumber : 1,buildingNumber:info.buildingNumber}})">楼栋模型
|
||||
@click="$router.push({query: {communityId: info.communityId, buildingId: info.id,unitNum:house ? house.unitNumber : 1,buildingNumber:info.buildingNumber}})">
|
||||
楼栋模型
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -160,12 +161,12 @@ export default {
|
||||
buildList: [],
|
||||
searchList: [],
|
||||
house: null,
|
||||
center: []
|
||||
center: [],
|
||||
mapLib: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
hasCommunityId() {
|
||||
return !!this.$route.query?.communityId
|
||||
}
|
||||
@@ -293,7 +294,7 @@ export default {
|
||||
<div class="polymeric-container">
|
||||
<p>${context.count}</p>
|
||||
</div>
|
||||
</div>`
|
||||
</div>`, {mapLib: AMap} = this
|
||||
|
||||
let offset = new AMap.Pixel(-9, -9)
|
||||
context.marker.setContent(el)
|
||||
@@ -336,6 +337,7 @@ export default {
|
||||
},
|
||||
|
||||
addMakert(points) {
|
||||
let {mapLib: AMap} = this
|
||||
new AMap.MarkerClusterer(this.map, points, {
|
||||
gridSize: 60,
|
||||
maxZoom: 15,
|
||||
@@ -352,7 +354,7 @@ export default {
|
||||
size: 1000000
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res?.data) {
|
||||
this.buildList = res.data.records
|
||||
const points = res.data.records.map(item => {
|
||||
return {
|
||||
@@ -364,17 +366,14 @@ export default {
|
||||
communityName: item.communityName
|
||||
}
|
||||
})
|
||||
|
||||
this.addMakert(points)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
hidePopup() {
|
||||
this.isShowArea = false
|
||||
this.isShowSearch = false
|
||||
},
|
||||
|
||||
switchLayer(flag) {
|
||||
if (flag) {
|
||||
this.map.addLayer(this.satellite)
|
||||
@@ -384,7 +383,6 @@ export default {
|
||||
|
||||
this.isImageMap = flag
|
||||
},
|
||||
|
||||
initMap({lng, lat}) {
|
||||
this.center = [lng, lat];
|
||||
AMapLoader.load({
|
||||
@@ -396,6 +394,7 @@ export default {
|
||||
plugins: []
|
||||
}
|
||||
}).then((AMap) => {
|
||||
this.mapLib = AMap
|
||||
this.map = new AMap.Map('map', {
|
||||
resizeEnable: true,
|
||||
zooms: [6, 20],
|
||||
|
||||
@@ -102,7 +102,8 @@
|
||||
</div>
|
||||
<div class="community-btn" v-if="!info.name">
|
||||
<el-button icon="iconfont iconloudongmoxing" size="small"
|
||||
@click="showStatistics=true; $router.push({query: {communityId: info.communityId, buildingId: info.id,unitNum:house ? house.unitNumber : 1,buildingNumber:info.buildingNumber}})">楼栋模型
|
||||
@click="showStatistics=true; $router.push({query: {communityId: info.communityId, buildingId: info.id,unitNum:house ? house.unitNumber : 1,buildingNumber:info.buildingNumber}})">
|
||||
楼栋模型
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,6 +159,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
mapLib: null,
|
||||
community: '',
|
||||
isShowLayer: false,
|
||||
isShowSearch: false,
|
||||
@@ -365,7 +367,7 @@ export default {
|
||||
<p>${context.count}</p>
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
let {mapLib: AMap} = this
|
||||
let offset = new AMap.Pixel(-9, -9)
|
||||
context.marker.setContent(el)
|
||||
context.marker.setOffset(offset)
|
||||
@@ -421,6 +423,7 @@ export default {
|
||||
},
|
||||
|
||||
addMakert(points) {
|
||||
let {mapLib: AMap} = this
|
||||
new AMap.MarkerClusterer(this.map, points, {
|
||||
gridSize: 60,
|
||||
maxZoom: 15,
|
||||
@@ -481,6 +484,7 @@ export default {
|
||||
plugins: []
|
||||
}
|
||||
}).then((AMap) => {
|
||||
this.mapLib = AMap
|
||||
this.map = new AMap.Map('map', {
|
||||
resizeEnable: true,
|
||||
zooms: [6, 20],
|
||||
@@ -1336,6 +1340,7 @@ export default {
|
||||
color: #89B;
|
||||
}
|
||||
}
|
||||
|
||||
.map-area__right {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user