diff --git a/project/beta/grid/AppBuildMap/AppBuildMap.vue b/project/beta/grid/AppBuildMap/AppBuildMap.vue
index 33572f37..c4050a71 100644
--- a/project/beta/grid/AppBuildMap/AppBuildMap.vue
+++ b/project/beta/grid/AppBuildMap/AppBuildMap.vue
@@ -35,7 +35,7 @@
+ let el = `
${context.data[0].communityName}
${context.data[0].buildingNumber}栋
-
+
`
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,29 +354,26 @@ 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 {
lnglat: [item.lng, item.lat],
id: item.id,
corpId: item.corpId,
- areaName:item.areaName,
- buildingNumber:item.buildingNumber,
- communityName:item.communityName
+ areaName: item.areaName,
+ buildingNumber: item.buildingNumber,
+ communityName: item.communityName
}
})
-
this.addMakert(points)
}
})
},
-
hidePopup() {
this.isShowArea = false
this.isShowSearch = false
},
-
switchLayer(flag) {
if (flag) {
this.map.addLayer(this.satellite)
@@ -384,9 +383,8 @@ export default {
this.isImageMap = flag
},
-
- initMap({lng,lat}) {
- this.center = [lng,lat];
+ initMap({lng, lat}) {
+ this.center = [lng, lat];
AMapLoader.load({
key: 'b553334ba34f7ac3cd09df9bc8b539dc',
version: '2.0',
@@ -396,6 +394,7 @@ export default {
plugins: []
}
}).then((AMap) => {
+ this.mapLib = AMap
this.map = new AMap.Map('map', {
resizeEnable: true,
zooms: [6, 20],
@@ -422,7 +421,7 @@ export default {
width: 100%;
}
-::v-deep .ai-list__content--right-wrapper{
+::v-deep .ai-list__content--right-wrapper {
height: 100%;
margin: 0px !important;
background-color: transparent !important;
@@ -804,7 +803,7 @@ export default {
white-space: nowrap;
}
- p:first-child{
+ p:first-child {
font-size: 14px;
}
@@ -816,7 +815,7 @@ export default {
}
}
-::v-deep .mark{
+::v-deep .mark {
user-select: none;
cursor: pointer;
height: 32px;
@@ -829,7 +828,7 @@ export default {
box-sizing: border-box;
padding: 0 12px;
- .mark-contaienr{
+ .mark-contaienr {
color: white;
font-size: 14px;
position: relative;
@@ -841,7 +840,7 @@ export default {
justify-content: center;
}
- .arrow{
+ .arrow {
position: absolute;
left: 50%;
transform: translateX(-50%);
diff --git a/project/beta/grid/AppHouseMap/AppHouseMap.vue b/project/beta/grid/AppHouseMap/AppHouseMap.vue
index ae0f5173..e38b5447 100644
--- a/project/beta/grid/AppHouseMap/AppHouseMap.vue
+++ b/project/beta/grid/AppHouseMap/AppHouseMap.vue
@@ -20,7 +20,7 @@