From 3376e0fb53575b3820562ac5a5c1767e92f903ff Mon Sep 17 00:00:00 2001 From: wgx <31655391@qq.com> Date: Tue, 18 Aug 2026 19:43:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=9C=E7=94=B0=E5=92=8C=E7=95=9C=E7=A6=BD?= =?UTF-8?q?=E7=9B=91=E6=B5=8B=E7=AB=99=E5=AE=8C=E6=88=90=EF=BC=9B=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E9=9C=80=E5=8A=A0=E4=B8=AA=E6=9D=80=E8=99=AB=E7=81=AF?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/index.css | 10 +- src/main.js | 4 +- src/pages/Home/index.vue | 42 ++- src/pages/MywrList/index.vue | 634 ++++++++++++++++++++++++++++------- 4 files changed, 553 insertions(+), 137 deletions(-) diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 07f7ee6..8a5a658 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -757,11 +757,11 @@ .jctctiao{ float: right; } -.jctc_add{ - height: 1vw; - padding-left: 5%; - margin-top: 0.6vw; -} +/*.jctc_add{*/ +/* min-height: 1vw;*/ +/* padding-left: 5%;*/ +/* margin-top: 0.6vw;*/ +/*}*/ .jctcicon1{ width: 0.7vw; margin-top: 0.1vw; diff --git a/src/main.js b/src/main.js index 8c38ce5..b5d51b0 100644 --- a/src/main.js +++ b/src/main.js @@ -31,7 +31,9 @@ VueAMap.initAMapApiLoader({ "AMap.MapType", //类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制 "AMap.PolyEditor", //编辑 折线多,边形 "AMap.CircleEditor", //圆形编辑器插件 - "AMap.Geolocation" //定位控件,用来获取和展示用户主机所在的经纬度位置 + "AMap.Geolocation", //定位控件,用来获取和展示用户主机所在的经纬度位置 + "AMap.MarkerCluster", //聚合Marker + "AMap.MassMarks", ], v: '2.0' }); diff --git a/src/pages/Home/index.vue b/src/pages/Home/index.vue index 85787e0..7d08e8b 100644 --- a/src/pages/Home/index.vue +++ b/src/pages/Home/index.vue @@ -526,6 +526,7 @@ export default { markersOrient: [], markersSoil: [], markersOther: [], + markersLight: [], lastClickIcon: '', urlimg: 'https://fxnsp.sxcooh.com/lh-api/sys/common/static/', mapTypeFlag: true, @@ -834,13 +835,14 @@ export default { }); that.aMap.on('complete', (e) => { let Marker = res.result.filter(ele => { - return ele.type != 'light' && ele.type != 'air' && ele.type != 'soil' + return ele.type != 'air' && ele.type != 'soil' && ele.type != 'light' } ).sort((a,b) => { 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);//加入企业点位数组 // console.log("初始化地图。2", Marker) @@ -849,7 +851,8 @@ export default { console.log("item = ", item) return; } - let marker = new AMap.Marker({ + let marker = null; + marker = new AMap.Marker({ zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1), icon: this.urlimg + item.picUrl, position: [item.longitude, item.latitude], @@ -898,6 +901,28 @@ export default { } marker.setMap(that.aMap); }) + if(MarkerLight.length > 0){ + var points = []; + MarkerLight.map(item => { + points.push({lnglat: [item.longitude, item.latitude],"name":"杀虫灯","style":2}); + }); + let clusterMarker = new AMap.MassMarks( + points,{ + opacity: 0.8, + zIndex: 111, + cursor: 'pointer', + style: [{ + url: this.urlimg + MarkerLight[0].picUrl, + anchor: new AMap.Pixel(6, 6), + size: new AMap.Size(18, 18), + zIndex: 3, + } + ] + } + ); + that.markersLight.push(clusterMarker); + clusterMarker.setMap(that.aMap); + } this.$forceUpdate(); // that.aMap.setFitView(null, false, [100,400,200,200], 16); // that.aMap.setFitView(); @@ -1194,17 +1219,6 @@ export default { } 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 => { @@ -1216,7 +1230,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.normalZoomData); + that.aMap.setFitView(that.markersOrient, false, [100, 400, 360, 360], that.normalZoomData); } } }, diff --git a/src/pages/MywrList/index.vue b/src/pages/MywrList/index.vue index 4e7e1fc..573f135 100644 --- a/src/pages/MywrList/index.vue +++ b/src/pages/MywrList/index.vue @@ -88,7 +88,7 @@ 设备状态:正常 -
+
监测指标 气象环境 -->
-
-
+
+
@@ -124,13 +124,13 @@
-
-
+
+
- 重点指标实时数据 + 重要污染实时数据
-
    +
    • @@ -159,15 +159,15 @@
      - 重点污染指标趋势 - - - - + 重要污染物趋势图 + + + + + + + +
@@ -199,7 +199,7 @@
- 粪污处理情况分析 + 畜禽粪污处理
@@ -220,6 +220,49 @@ {{DisplayListdetailList3?.detailValue}} {{DisplayListdetailList3?.detailValue2}}
+
+
+
+ 恶臭气体实时监测 + +
+
+ +
+ {{DisplayListstinkList4.detailValue}} + 空气质量 +
+
+ + 0 + + + + 臭气浓度 +
+
+ 0 + + + + 氨气 +
+
+ 0 + + + + 硫化氢 +
+
+ 0 + + + + 总挥发性有机物 +
+
+
@@ -280,69 +323,254 @@
-
- 水质数据实时监测 - -
-
-
-
-
-
- - {{ stationDetail.latestData[0].unit }}
+
+
+ 土壤数据实时监测 + +
+
+
+
+ 0CM + + + +
+
+ 20CM + + + +
+
+ 40CM + + + +
+
+ 60CM + + +
-
{{stationDetail.latestData[0].name}}
-
-
-
- - {{ stationDetail.latestData[1].unit }}
+
+
+ 土壤温度(℃) +
+
+ 土壤湿度(%ch) +
+
+ 土壤盐分(us/cm) +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + +
-
{{stationDetail.latestData[1].name}}
-
-
-
-
- - {{ stationDetail.latestData[2].unit }}
-
-
{{stationDetail.latestData[2].name}}
-
-
-
-
- - {{ stationDetail.latestData[3].unit }} +
+
+
+
+ 气象数据实时监测 + +
+
+
+
+
+ 风向
+ + 北风 + 北东北 + 东北 + 东东北 + + 东东南 + 东南 + 南东南 + + 南西南 + 西南 + 西西南 + 西 + 西西北 + 西北 + 北西北 + 静风
-
{{stationDetail.latestData[3].name}}
-
-
-
-
- - {{ stationDetail.latestData[4].unit }} +
+
+ 太阳全辐射
+ + + + w/m² +
+
+
+ 降雨量 +
+ + + + mm/hour +
+
+
+ + +
+
+
+
+ 风速 +
+ + + + M/s +
+
+
+ 空气温度 +
+ + + + ℃ +
+
+
+ 空气湿度 +
+ + + + %rh +
+
+
+ 大气压力 +
+ + + + mbar
-
{{stationDetail.latestData[4].name}}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -364,43 +592,43 @@ -
-
- 监测与预警 - -
-
- - - -
-
-   - {{activity.itemName}} -  {{activity.survValue}} - {{activity.survUnit}}  - - ({{activity.readStatus=='low'?'偏低':activity.readStatus=='high'?'偏高':'正常'}}) -
-
-
-  {{activity.alertTime}} -
-
-
-
-
-
-
暂无预警数据
-
-
-
- -
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -478,13 +706,19 @@ export default { play: false, //默认停止播放 nowTime: '', stationDetail: null, - DetailListAirData: '', - // DetailListSoilData: '', + DetailListAirData: {}, + DetailListSoilData: {}, + latestStinkData: {}, DisplayList: '', DisplayListdetailList0: '', DisplayListdetailList1: '', DisplayListdetailList2: '', DisplayListdetailList3: '', + DisplayListstinkList4:'', + DisplayListstinkList3:'', + DisplayListstinkList2:'', + DisplayListstinkList1:'', + DisplayListstinkList0:'', inforname: '', dialogVisible: false, fullscreen: false, //全屏 @@ -492,7 +726,7 @@ export default { waterData: {}, summryAllDataJson: null, maintainLogList: [], - dateType: 'monthDays', + dateType: 'yearMonth', dateTypeOptions: [ { value: 'dayhours', label: '24小时' @@ -560,6 +794,7 @@ export default { } }, initStart(){ + let that = this; this.loading = true; // 实时时间 this.infor() @@ -569,6 +804,13 @@ export default { this.DisplayListdetailList1 = val.result.effect_assess[0].detailList[1] this.DisplayListdetailList2 = val.result.effect_assess[0].detailList[2] this.DisplayListdetailList3 = val.result.effect_assess[0].detailList[3] + if(val.result.stink && val.result.stink[0] && val.result.stink && val.result.stink[0].detailList){ + this.DisplayListstinkList4 = val.result.stink[0].detailList[4] + this.DisplayListstinkList3 = val.result.stink[0].detailList[3] + this.DisplayListstinkList2 = val.result.stink[0].detailList[2] + this.DisplayListstinkList1 = val.result.stink[0].detailList[1] + this.DisplayListstinkList0 = val.result.stink[0].detailList[0] + } }) this.initChartData();//下方echart监测图标 this.stationDetailApi(); @@ -668,7 +910,7 @@ export default { name: item.name, type: 'line', stack: 'Total', - areaStyle: {}, + // areaStyle: {},//阴影面积 data: item.value, lineStyle: { color: item.color // 设置线的颜色为红色 @@ -807,11 +1049,25 @@ export default { that.stationDetail.latestData = [] } getStationDetail(this.stationCode).then(res => { + let that = this; this.stationDetail = res.result this.stationType = res.result.stationType - this.DetailListAirData = res.result.latestAirData[0] - //空气数据 - if (this.DetailListAirData) { } + // this.latestStinkData = res.result.latestStinkData + if(res.result.latestAirData){//空气数据 + res.result.latestAirData.map(item => { + that.DetailListAirData[item.survItem] = item; + }) + } + if(res.result.latestSoilData){//土壤数据 + res.result.latestSoilData.map(item => { + that.DetailListSoilData[item.survItem] = item; + }) + } + if(res.result.latestStinkData){//土壤数据 + res.result.latestStinkData.map(item => { + that.latestStinkData[item.survItem] = item; + }) + } if (this.stationDetail.latestWaterData[0]) { //水数据 this.stationDetail.latestWaterData.map(item => { if(item.survItem == 'dataWaterTemp'){ @@ -829,8 +1085,6 @@ export default { this.animateObj = []; this.hhlistxunh(); } - // 土壤数据 - // this.DetailListSoilData = res.result.latestSoilData[0] that.currentPlayerLive = {}; // 监控画面 setTimeout(() => { @@ -946,6 +1200,9 @@ export default { } this.fullscreen = !this.fullscreen; }, + formatter: function (num) { + return num.toFixed(2) + }, } } @@ -1289,7 +1546,7 @@ export default { .home_dlhj { width: 88%; min-height: 2vw !important; - height: 15vw !important; + height: 13vw !important; margin: 0 auto; } @@ -1722,7 +1979,8 @@ export default { } .jctc_add { - height: 1vw; + //height: 1vw; + min-height: 1vw !important; padding-left: 3%; margin-top: 0.6vw; } @@ -1820,7 +2078,7 @@ export default { } .qxjcimg2 { - width: 50%; + width: 48%; height: 15.4vw; float: left; } @@ -1879,7 +2137,7 @@ export default { .mywrcov_lf_num { position: absolute; - top: 0; + top: 6px; left: 0; font-size: 0.6vw; color: #86ffa2; @@ -2066,6 +2324,9 @@ export default { width: 30%; height: 100%; position: relative; + box-sizing: border-box; + padding: 5px; + overflow: hidden; } .baseBoxRight { @@ -2690,5 +2951,144 @@ a:hover { z-index: 1; } } + +/* 恶臭样式 */ + +.ecqtssjc{ + width: 100%; + height: 16.2vw; + position: relative; +} +.ecjcbak{ + position: absolute; + width: 60%; + top: 1vw; + left: 20%; + z-index: 1; +} +.ecqtssjc_con{ + position: absolute; + width: 7vw; + height: 7vw; + top: 2.8vw; + left: 34%; + z-index: 2; + background: url(../../assets/image/eckqzl.png)no-repeat; + background-size: cover; +} +.ecqtssjc_con_tit{ + font-size: 1vw; + color: #1ad35f; + display: block; + text-align: center; + margin-top: 2.4vw; + font-weight: bold; +} +.ecqtssjc_con_sma{ + font-size: 0.8vw; + color: #bcd3f5; + display: block; + text-align: center; +} +.ecqtssjc_lettp{ + position: absolute; + width: 6vw; + height: 6vw; + top: 0.4vw; + left: 10%; + z-index: 2; + background: url(../../assets/image/eckqzltopleft.png)no-repeat; + background-size: cover; +} +.ecqtssjc_lettp_tit{ + font-size: 1vw; + color: #ffd4d4; + display: block; + text-align: center; + margin-top: 2.0vw; + font-weight: bold; +} +.ecqtssjc_lettp_sma{ + font-size: 0.8vw; + color: #bcd3f5; + display: block; + text-align: center; + margin-top: 1.4vw; +} +.ecqtssjc_lettb{ + position: absolute; + width: 6vw; + height: 6vw; + top: 6.4vw; + left: 8%; + z-index: 2; + background: url(../../assets/image/eckqzltoplefb.png)no-repeat; + background-size: cover; +} +.ecqtssjc_lettb_tit{ + font-size: 1vw; + color: #f9ffd0; + display: block; + text-align: center; + margin-top: 2.0vw; + font-weight: bold; +} +.ecqtssjc_lettb_sma{ + font-size: 0.8vw; + color: #bcd3f5; + display: block; + text-align: center; + margin-top: 1.4vw; +} +.ecqtssjc_ritp{ + position: absolute; + width: 6vw; + height: 6vw; + top: 0.4vw; + right: 8%; + z-index: 2; + background: url(../../assets/image/eckqzltopritb.png)no-repeat; + background-size: cover; +} +.ecqtssjc_ritp_tit{ + font-size: 1vw; + color: #f9ffd0; + display: block; + text-align: center; + margin-top: 2.0vw; + font-weight: bold; +} +.ecqtssjc_ritp_sma{ + font-size: 0.8vw; + color: #fff4d1; + display: block; + text-align: center; + margin-top: 1.4vw; +} +.ecqtssjc_ritb{ + position: absolute; + width: 6vw; + height: 6vw; + top: 7.4vw; + right: 14%; + z-index: 2; + background: url(../../assets/image/eckqzltopritp.png)no-repeat; + background-size: cover; +} +.ecqtssjc_ritb_tit{ + font-size: 1vw; + color: #ccffe9; + display: block; + text-align: center; + margin-top: 2.0vw; + font-weight: bold; +} +.ecqtssjc_ritb_sma{ + font-size: 0.8vw; + color: #bcd3f5; + display: block; + text-align: center; + margin-top: 1.4vw; +}