소스 검색

灾后评估 落点

jiangbo 2 년 전
부모
커밋
ad3e6e3172
1개의 변경된 파일118개의 추가작업 그리고 2개의 파일을 삭제
  1. 118 2
      src/views/disaster.vue

+ 118 - 2
src/views/disaster.vue

@@ -162,7 +162,7 @@
       </div>
       <!-- 地图 -->
       <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'disasterMap'" class="indexSupermapClass"
-                :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"></supermap>
+                :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false" @showEventDialog="showEventDialog"></supermap>
       <!-- 右侧 -->
       <div class="rightbar" :class="indentright" ref="right">
         <div class="forthis">
@@ -442,7 +442,9 @@ export default {
       indentleft: '',
       indentright: '',
       indentText: '收起左右栏',
-      indentdisabled: false
+      indentdisabled: false,
+
+      markersList: [], //点位列表
     }
   },
 
@@ -454,6 +456,10 @@ export default {
       this.$refs.bottomMenu.linBanTreeselect()//查询林班层级树结构
       this.$refs.bottomMenu.deptTreeselect()//查询林场部门树结构
     },
+    showEventDialog(eventCode) {
+      //事件信息弹出
+      this.$refs.eventdetailsdialog.showEventDialog(eventCode)
+    },
     showDialog(click) {
       if (click == 'eventLocation') {
         this.$refs.eventLocation.showEventLocation()
@@ -522,6 +528,7 @@ export default {
     choseFireList(id,eventId, index) {
       this.listCurrentIndex = index
       let that = this
+
       selectFireLoseByid({id:id,eventId:eventId}).then(res => {
         this.graphicsList = []
         //地图标记
@@ -534,12 +541,60 @@ export default {
             this.graphicsList.push(latlng)
           }
           setTimeout(() => {
+
             that.$refs.supermap.clearG()
             that.$refs.supermap.setGraphicsList(this.graphicsList, 'red')
           }, 1000)
         } else {
           that.$refs.supermap.clearG()
         }
+
+        that.$refs.supermap.clearM(false)
+        that.$refs.supermap.clearM(true)
+        that.markersList = [];
+          let markersMap = {
+            lng: 124.59,
+            lat: 43.02,
+            icon: 'marker',
+            bindPopupHtml: '',
+            click: '',
+            parameter: '',
+            keepBindPopup: false,
+            isAggregation: true
+          }
+          // markersMap.click = 'showEventDialog'
+          markersMap.parameter = res.data.visuForestFireLossBO.eventCode
+          markersMap.lng = res.data.visuForestFireLossBO.longitude
+          markersMap.lat = res.data.visuForestFireLossBO.latitude
+
+          markersMap.bindPopupHtml = '<div class="map-tip">' +
+            '<span>' +
+            '                  <div class="d-l-con">' +
+            '                  <div class="d-l-l-text">' +
+            '                  <h4>经纬度:' + markersMap.lng + ',' + markersMap.lat + '</h4>' +
+            '                </div>' +
+            '                </div>' +
+            '                </span>' +
+            '<span>' +
+            '                  <div class="d-l-con">' +
+            '                  <div class="d-l-l-text">' +
+            '                  <h4>事件名称:' + res.data.visuForestFireLossBO.eventName + '</h4>' +
+            '                </div>' +
+            '                </div>' +
+            '                </span>' +
+            '<span>' +
+            '                  <div class="d-l-con">' +
+            '                  <div class="d-l-l-text">' +
+            '                  <h4>事件时间:' + res.data.visuForestFireLossBO.createTime + '</h4>' +
+            '                </div>' +
+            '                </div>' +
+            '                </span>';
+          markersMap.bindPopupHtml += '</div>'
+          this.markersList.push(markersMap)
+
+          that.$refs.supermap.setMarkers(that.markersList)
+
+
         //右侧
         this.fireLossTotal = res.data.visuForestFireLossBO.fireLossTotal != null ? res.data
           .visuForestFireLossBO.fireLossTotal : 0
@@ -620,7 +675,68 @@ export default {
           .length > 0) {
           this.numberFiresYear = res.data.visuForestFireLossTimeBOList.length
           this.fireList = res.data.visuForestFireLossTimeBOList
+
+          this.markersList = [];
+          for (let i = 0; i < this.fireList.length; i++) {
+            let markersMap = {
+              lng: 124.59,
+              lat: 43.02,
+              icon: 'marker',
+              bindPopupHtml: '',
+              click: '',
+              parameter: '',
+              keepBindPopup: false,
+              isAggregation: true
+            }
+            // markersMap.click = 'showEventDialog'
+            markersMap.parameter = this.fireList[i].eventCode
+            markersMap.lng = this.fireList[i].longitude
+            markersMap.lat = this.fireList[i].latitude
+
+            markersMap.bindPopupHtml = '<div class="map-tip">' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>经纬度:' + this.fireList[i].longitude + ',' + this.fireList[i].latitude + '</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>事件名称:' + this.fireList[i].eventName + '</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>' +
+              '<span>' +
+              '                  <div class="d-l-con">' +
+              '                  <div class="d-l-l-text">' +
+              '                  <h4>事件时间:' + this.fireList[i].createTime + '</h4>' +
+              '                </div>' +
+              '                </div>' +
+              '                </span>';
+            if (this.fireList[i].pictureType == 'image' && this.fireList[i].picturePath != null && this.fireList[i].picturePath != '') {
+              markersMap.bindPopupHtml += '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '<img src="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>'
+            }
+            markersMap.bindPopupHtml += '</div>'
+            this.markersList.push(markersMap)
+
+          }
+
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.clearM(true)
+            that.$refs.supermap.setMarkers(that.markersList)
+
         } else {
+
+            that.$refs.supermap.clearM(false)
+            that.$refs.supermap.clearM(true)
           this.numberFiresYear = 0
         }