From ecdc6110f81d8a6b5881c211a70d6cae674986ad Mon Sep 17 00:00:00 2001 From: wgx <31655391@qq.com> Date: Wed, 12 Aug 2026 17:56:11 +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 --- public/image/enticon.png | Bin 0 -> 1179 bytes src/api/index.js | 8 +++ src/pages/Home/index.vue | 128 +++++++++++++++++++++++++++++------ src/pages/MywrList/index.vue | 2 +- 4 files changed, 115 insertions(+), 23 deletions(-) create mode 100644 public/image/enticon.png diff --git a/public/image/enticon.png b/public/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/api/index.js b/src/api/index.js index 1bd1c5b..47f3236 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -112,6 +112,14 @@ export function getSoilSummry(data) { headers: {}, }) } +// 各个站坐标点 +export function getCompanyList() { + return requests({ + url: '/zh-applet-admin/appmana/bigScreen/getEntList', + method: 'get', + headers: {}, + }) +} // 查询设备下各检测项的历史数据 export function survItemSummary(obj) { return requests({ diff --git a/src/pages/Home/index.vue b/src/pages/Home/index.vue index 8d51571..7ff989b 100644 --- a/src/pages/Home/index.vue +++ b/src/pages/Home/index.vue @@ -450,7 +450,7 @@ -
+
@@ -462,8 +462,8 @@
- {{ qyinformation.name }} - {{ qyinformation.notes }} + {{ qyinformation.entName }} + {{ qyinformation.entIntro }}
@@ -482,7 +482,7 @@ import ScaleBox from 'vue2-scale-box' import { displayInfo, fwlist, - getAllstationAndPestLight, + getAllstationAndPestLight, getCompanyList, getIndexSummry, getNewestData, getPollutionDict, @@ -545,6 +545,7 @@ export default { qcdtdialogTableVisible: false, qyinfordtdialogTableVisible: false, shipdialogTableVisible: false, + entList:[], qyinformation: '', listData: [], summryAllData: null, @@ -555,7 +556,7 @@ export default { dialogVisible: false, inforname: '', loading: true, - zoomData: 8, + zoomData: 10, focusZoomData: 14, isShowLightNumber: '1', switchValue: true, @@ -627,10 +628,37 @@ export default { // }) // }, 2000) // 实时时间 + + let that = this; setTimeout(() => { - this.$nextTick(() => { - this.initMap(this.zoomData, this.isShowLightNumber); - }) + getCompanyList().then(res => { + that.entList = res.result.map(item => { + item.type = 'cusLocaltion'; + item.longitude = item.entLong; + item.latitude = item.entLat; + item.name = item.entName; + item.picUrl = '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.zoomData, that.isShowLightNumber); + }) + }); }, 2000) //初始化数据 this.getNowTime(); @@ -773,8 +801,8 @@ export default { }, 200) }, initMap(zoomnum, isShowLight) { + console.log("初始化地图。") let that = this; - // let isShowLight = this.isShowLightNumber getAllstationAndPestLight(isShowLight).then(res => { // 地图 that.aMap = new AMap.Map('container', { @@ -796,13 +824,14 @@ export default { scale: (2, 2.5) }); that.aMap.on('complete', (e) => { - var markerData = res.result; - let Marker = markerData.filter(ele => ele.type != 'light').sort((a,b) => { + let Marker = res.result.filter(ele => ele.type != 'light').sort((a,b) => { if (b.type=='soil') return 1; if (b.type!='soil') return -1; return 0; });//其他类型 // console.log(Marker,'Marker') + Marker.push(...this.entList); + console.log("初始化地图。2", Marker) Marker.map(item => { let marker = new AMap.Marker({ zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1), @@ -810,6 +839,10 @@ export default { position: [item.longitude, item.latitude], offset: new AMap.Pixel(item.width, item.height),//偏移量 title: item.name, + label: { + content: item.type == "cusLocaltion"? item.name : '', + direction: 'top' + }, extData: { ids: item.ids, extPics: item.extPics, @@ -824,7 +857,6 @@ export default { let indexnumb = e.target.getExtData().ids.slice(-1); this.qcdtinfor = this.stationInfoList[indexnumb] this.qcdtdialogTableVisible = true - // console.log('livestock or orient', this.qyinformation) }) this.markersOrient.push(marker) } else if(item.type == 'soil'){//土壤弹窗,长期监测站 @@ -834,7 +866,18 @@ export default { // console.log('soil click', ) }) this.markersSoil.push(marker); - } else { + } else if(item.type == "cusLocaltion"){//企业类型 + marker.on("click", e => { + this.qyinformation= e.target.getExtData().item + if(this.qyinformation.entPics){ + this.qyinformation.extPics = this.qyinformation.entPics.split(","); + }else { + this.qyinformation.extPics = [] + } + console.log("this.qyinformation",this.qyinformation) + this.qyinfordtdialogTableVisible = true + }) + } else { this.markersOther.push(marker) } marker.setMap(that.aMap); @@ -1517,14 +1560,8 @@ a:hover { .map img { width: 80%; - margin-left: 10%; + //margin-left: 10%; } - -.map img { - width: 80%; - margin-left: 10%; -} - .mapActived1 { position: absolute; top: 41.5%; @@ -1768,20 +1805,23 @@ a:hover { /* 企业弹窗样式 */ .tctit { font-size: 1.2vw; - color: #fff; + color: #0bf373; font-weight: bold; display: block; margin-bottom: 1.6vw; + margin: 5px auto; + text-align: center; } .tcgldw { - font-size: 1vw; + font-size: 0.8vw; color: #fff; line-height: 2vw; display: block; padding-right: 3%; height: 15vw; overflow: auto; + text-indent: 2em; } /* 定义滚动条样式 */ @@ -1945,5 +1985,49 @@ a:hover { .mywrcov_onenumjx{ font-size: 1.2vw; } +.amap-marker-label{ + //width: 60px; + font-size: 16px; + line-height: 18px; + text-align: center; + height: 18px; + font-family: STLiti; + color: #bbd6f1; + border-radius: 15px; + padding: 5px; + background-color: rgba(77, 140, 241, 0.84); + border: solid 2px rgba(100,255,200,0.8); +} + +.tz_cov{ + width: 100%; + height: 30vw; + margin: 0 auto; + /* margin-top: 4vw; */ + border: 1px solid #0169d0; + position: relative; + background: rgba(16, 45, 80, 1); + box-shadow: inset 0px 0px 16px 0px rgba(0, 145, 255, 1); + padding: 20px; +} +.tz_cov_top{ + width: 40%; + height: 3vw; + margin: 0 auto; + background: url(../../assets/image/tz_tltle_bg.png)no-repeat; + background-size: cover; + text-align: center; + line-height: 3vw; + margin-bottom: 2vw; +} +.tz_cov_top_tit{ + font-size: 1vw; + color: #fff; + text-shadow: 0px 2px 0px rgba(4,49,52,0.55); + font-family: douyuFont; +} +.grid-content{ + padding: 10px +} diff --git a/src/pages/MywrList/index.vue b/src/pages/MywrList/index.vue index 7409b26..4e7e1fc 100644 --- a/src/pages/MywrList/index.vue +++ b/src/pages/MywrList/index.vue @@ -217,7 +217,7 @@ {{DisplayListdetailList3?.detailCode}} - + {{DisplayListdetailList3?.detailValue}} {{DisplayListdetailList3?.detailValue2}}