From c823be81ff303ac6acd5fad3a94361dab06ed74c Mon Sep 17 00:00:00 2001
From: wgx <31655391@qq.com>
Date: Wed, 19 Aug 2026 18:32:33 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=94=B9=E9=80=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/Home/index.vue | 68 ++++++++++++++++++++++++----------------
1 file changed, 41 insertions(+), 27 deletions(-)
diff --git a/src/pages/Home/index.vue b/src/pages/Home/index.vue
index 7d08e8b..43417e2 100644
--- a/src/pages/Home/index.vue
+++ b/src/pages/Home/index.vue
@@ -207,10 +207,19 @@
-
-

-
联网式太阳能杀虫灯
+
+

+
联网式太阳能杀虫灯
+
+
+
+
@@ -647,24 +656,11 @@ export default {
item.longitude = item.entLong;
item.latitude = item.entLat;
item.name = item.entName;
- item.picUrl = 'temp/enticon.png';
+ item.picUrl = item.entMapIcon||'temp/enticon.png';
item.width = 0 ;
item.height = 0;
- // zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1),
- // icon: this.urlimg + item.picUrl,
- // position: [item.longitude, item.latitude],
- // offset: new AMap.Pixel(item.width, item.height),//偏移量
- // title: item.name,
return item;
});
- // ids: item.ids,
- // extPics: item.extPics,
- // notes: item.notes,
- // name: item.name,
- // item: item,
- // stationType: item.type
- //
- console.log(that.entList,'111222')
that.$nextTick(() => {
that.initMap(that.iniZoomData, that.isShowLightNumber);
})
@@ -835,24 +831,23 @@ export default {
});
that.aMap.on('complete', (e) => {
let Marker = res.result.filter(ele => {
- return ele.type != 'air' && ele.type != 'soil' && ele.type != 'light'
+ return ele.type != 'air' && ele.type != 'soil' && ele.type != 'light' && ele.type != 'cusLocaltion'
}
).sort((a,b) => {
- if (b.type=='soil') return 1;
- if (b.type!='soil') return -1;
- return 0;
+ if (b.type=='soil') return 1;
+ if (b.type!='soil') return -1;
+ return 0;
});//其他类型
let MarkerLight = res.result.filter(ele => ele.type == 'light' );
// console.log(Marker,'Marker')
- // Marker.push(...this.entList);//加入企业点位数组
+ Marker.push(...this.entList);//加入企业点位数组
// console.log("初始化地图。2", Marker)
Marker.map(item => {
- if(!item.longitude && !item.latitude){
- console.log("item = ", item)
+ if(!item.longitude || !item.latitude){
+ console.log("item坐标缺失:", item)
return;
}
- let marker = null;
- marker = new AMap.Marker({
+ let marker = new AMap.Marker({
zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1),
icon: this.urlimg + item.picUrl,
position: [item.longitude, item.latitude],
@@ -887,6 +882,7 @@ export default {
this.markersSoil.push(marker);
} else if(item.type == "ent"){//企业类型
marker.on("click", e => {
+ console.log('click ent')
this.qyinformation= e.target.getExtData().item
if(this.qyinformation.entPics){
this.qyinformation.extPics = this.qyinformation.entPics.split(",");
@@ -921,7 +917,7 @@ export default {
}
);
that.markersLight.push(clusterMarker);
- clusterMarker.setMap(that.aMap);
+ setTimeout(()=>{clusterMarker.setMap(that.aMap);}, 3500);
}
this.$forceUpdate();
// that.aMap.setFitView(null, false, [100,400,200,200], 16);
@@ -1232,6 +1228,17 @@ export default {
} else {
that.aMap.setFitView(that.markersOrient, false, [100, 400, 360, 360], that.normalZoomData);
}
+ },
+ switchLightIcon(){
+ this.markersLight.map(item => {
+ if(item.hide1){
+ item.show();
+ item.hide1 = false;
+ } else {
+ item.hide();
+ item.hide1 = true;
+ }
+ })
}
},
}
@@ -2068,4 +2075,11 @@ a:hover {
.grid-content{
padding: 10px
}
+
+.jctc_add {
+ //height: 1vw;
+ min-height: 1vw !important;
+ padding-left: 18px;
+ margin-top: 0.6vw;
+}