From 5c28f8d61bdbf02d1c689fc39e5808ce09abcf4d Mon Sep 17 00:00:00 2001 From: wgx <31655391@qq.com> Date: Thu, 13 Aug 2026 18:02:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=B7=BB=E5=8A=A0=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E6=A0=87=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/image/enticon.png | Bin 0 -> 1179 bytes src/pages/Home/index.vue | 58 ++++++++++++++++++++++------------- 2 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 src/assets/image/enticon.png diff --git a/src/assets/image/enticon.png b/src/assets/image/enticon.png new file mode 100644 index 0000000000000000000000000000000000000000..a8de82522fa5ae67327636c9f6f28549b0ba85d8 GIT binary patch literal 1179 zcmV;M1Z4Y(P)d2d^22X~s#=2n3>uB$^l{62YKLHYP4yxG=iV$iir1)Rl=rjR_KC zgayii4I5SlBcRU00WlID3W_M>APn=u>FJ?g^*W}yYnUP3MsD(_JGbio`Oo?PdrG!V z#V;K#hEJo(b{v1=$sruWIDW#Har^|R12rK1FJ$Xsup7Z`h1_;xJ4Ic;AmUqjbxsw9 z@5&LsL<&UU3s}zM%SpWCIMly{+5{w)o5sU8cJ{ju zM!Hpu@u6B%m65EUgMxL%0+xp?k= zCWb=YlTTGj)8CZ%CU7zJJ%PunKINit_-4YHT0ps4hd83(3w@SKEPQOTU>F>bGaL`Y zU00OpUKWN z)<9xg;qb$@ZVbhfyEogVJ9J#Hg6oJU?q>uk5t)z)?u3x#*GkIX7(DU}j&|jGv zusjDrrSi3Z`S0m+`6f1(Yux=7rB%OW4;AHs$^6#JSh(TWX!7jZ!NF~=4wZUXs$Kf4 z?nmL9wxi=Ls>ibE+#ZlN4K<=XSIOz~>dE@C$>OQepmxJLn42jc$%Vm;IJXAXXMq>e z$#Ey74*^dBRq<^}iqW}0ip3vBoX+{vH@?Bz5^xo$0FMG&TFP%jTA(>oifL(i-z~W| zF>|c;PyKsOld>3--iav7U=J{OC!{0UDD7zcI_XY|@l-x3R`K1^?8A_j+_h-r{x9iy z;1IAKxErNIoOCHJXbwr1WeQWZM}XlwAx$IsRo1snz(C^*y3qf$>@&bg;Kw%S+mg<& tpMh~;9gvRLv>j=DCV}69v9_mxe*q8^?TA>}1<3#a002ovPDHLkV1l1-E|>rS literal 0 HcmV?d00001 diff --git a/src/pages/Home/index.vue b/src/pages/Home/index.vue index 7ff989b..d8b67f2 100644 --- a/src/pages/Home/index.vue +++ b/src/pages/Home/index.vue @@ -203,6 +203,10 @@ +
+ + 企业信息 +
@@ -556,7 +560,8 @@ export default { dialogVisible: false, inforname: '', loading: true, - zoomData: 10, + iniZoomData: 11, + normalZoomData: 12, focusZoomData: 14, isShowLightNumber: '1', switchValue: true, @@ -633,7 +638,7 @@ export default { setTimeout(() => { getCompanyList().then(res => { that.entList = res.result.map(item => { - item.type = 'cusLocaltion'; + item.type = 'ent'; item.longitude = item.entLong; item.latitude = item.entLat; item.name = item.entName; @@ -656,7 +661,7 @@ export default { // console.log(that.entList,'111222') that.$nextTick(() => { - that.initMap(that.zoomData, that.isShowLightNumber); + that.initMap(that.iniZoomData, that.isShowLightNumber); }) }); }, 2000) @@ -687,13 +692,13 @@ export default { mapTypeSwitch() { this.mapTypeFlag = !this.mapTypeFlag if (this.mapTypeFlag == true) {//正常模式 - // this.zoomData = 14 + // this.iniZoomData = 14 if (this.isShowLight == undefined) { let isShowLight = '1' - this.initMap(this.zoomData, isShowLight); + this.initMap(this.iniZoomData, isShowLight); } else { let isShowLight = this.isShowLight - this.initMap(this.zoomData, isShowLight); + this.initMap(this.iniZoomData, isShowLight); } setTimeout(() => { this.$nextTick(() => { @@ -701,11 +706,11 @@ export default { }) }, 1000) } else {// 地图模式 - // this.zoomData = 15 + // this.iniZoomData = 15 if (this.isShowLight == undefined) { - this.initMap(this.zoomData, '1'); + this.initMap(this.iniZoomData, '1'); } else { - this.initMap(this.zoomData, this.isShowLight); + this.initMap(this.iniZoomData, this.isShowLight); } } }, @@ -758,11 +763,11 @@ export default { if (value == true) { let isShowLight = '1' this.isShowLight = isShowLight - this.initMap(this.zoomData, isShowLight) + this.initMap(this.iniZoomData, isShowLight) } else { let isShowLight = '' this.isShowLight = isShowLight - this.initMap(this.zoomData, isShowLight) + this.initMap(this.iniZoomData, isShowLight) } }, scaleChange(e) { @@ -840,7 +845,7 @@ export default { offset: new AMap.Pixel(item.width, item.height),//偏移量 title: item.name, label: { - content: item.type == "cusLocaltion"? item.name : '', + content: item.type == "ent"? item.name : '', direction: 'top' }, extData: { @@ -866,7 +871,7 @@ export default { // console.log('soil click', ) }) this.markersSoil.push(marker); - } else if(item.type == "cusLocaltion"){//企业类型 + } else if(item.type == "ent"){//企业类型 marker.on("click", e => { this.qyinformation= e.target.getExtData().item if(this.qyinformation.entPics){ @@ -877,6 +882,7 @@ export default { console.log("this.qyinformation",this.qyinformation) this.qyinfordtdialogTableVisible = true }) + this.markersOrient.push(marker); } else { this.markersOther.push(marker) } @@ -886,7 +892,8 @@ export default { // that.aMap.setFitView(null, false, [100,400,200,200], 16); // that.aMap.setFitView(); setTimeout(() => { - that.aMap.setFitView(null, false, [130, 380, 480, 480], 12); + that.switchIcon('1'); + // that.aMap.setFitView(null, false, [130, 380, 480, 480], 12); // let temp = that.aMap.getCenter();//矫正显示标点位置在正中心 // that.aMap.setZoomAndCenter(that.aMap.getZoom()-1, [temp.lng, temp.lat - 0.15]); }, 2000) @@ -1172,15 +1179,22 @@ export default { this.lastClickIcon = '' } else { this.lastClickIcon = flag; - if (flag == 'livestock') { - arr = this.markersOrient.filter(item => item.getExtData().stationType.indexOf("livestock") != -1); - } else if (flag == 'orient') { - arr = this.markersOrient.filter(item => item.getExtData().stationType.indexOf("orient") != -1); - } else if (flag == 'watershed') { - arr = this.markersOrient.filter(item => item.getExtData().stationType.indexOf("watershed") != -1); - } else if (flag == 'soil') { + if (flag == 'soil') { arr = this.markersSoil; + } else { + arr = this.markersOrient.filter(item => item.getExtData().stationType.indexOf(flag) != -1); } + // if (flag == 'livestock') { + // arr = this.markersOrient.filter(item => item.getExtData().stationType.indexOf("livestock") != -1); + // } else if (flag == 'orient') { + // arr = this.markersOrient.filter(item => item.getExtData().stationType.indexOf("orient") != -1); + // } else if (flag == 'watershed') { + // arr = this.markersOrient.filter(item => item.getExtData().stationType.indexOf("watershed") != -1); + // } else if (flag == 'soil') { + // arr = this.markersSoil; + // } else if (flag == 'ent') { + // arr = this.markersSoil; + // } } if (arr && arr.length > 0) { arr.map(item => { @@ -1192,7 +1206,7 @@ export default { // that.aMap.setZoomAndCenter(that.aMap.getZoom()-2, [temp.lng, temp.lat - 0.15]); // },2000) } else { - that.aMap.setFitView(null, false, [100, 400, 360, 360], that.zoomData); + that.aMap.setFitView(null, false, [100, 400, 360, 360], that.normalZoomData); } } },