浏览代码

事件详情+截图调整

彭宇 2 年之前
父节点
当前提交
1a01fa71bc
共有 4 个文件被更改,包括 863 次插入841 次删除
  1. 14 2
      src/assets/styles/base.scss
  2. 826 821
      src/components/supermap.vue
  3. 19 14
      src/views/eventdetailsdialog.vue
  4. 4 4
      src/views/forest.vue

+ 14 - 2
src/assets/styles/base.scss

@@ -998,7 +998,7 @@ div::-webkit-scrollbar {
 					.event-list-search{
 						padding: 0 .5rem;
 						margin-bottom: 1rem;
-						
+
 					}
 
 
@@ -2087,7 +2087,7 @@ div::-webkit-scrollbar {
   .el-tree-node:focus>.el-tree-node__content{
 	  background-color: $inBlue;
   }
- 
+
 
 //外层嵌套
   .event-info {
@@ -2174,3 +2174,15 @@ div::-webkit-scrollbar {
 	transform: translateX(-20rem)  !important;
 	transition: all 0.5s ease-in-out  !important;
 }
+
+
+//超图绘制截屏
+.leaflet-pane .leaflet-overlay-pane {
+  height: 75vh !important;
+  width: 143vh !important;
+}
+.leaflet-pane .leaflet-overlay-pane svg {
+  height: 75vh !important;
+  width: 143vh !important;
+  transform: translate3d(0px, 0px, 0px)!important;
+}

文件差异内容过多而无法显示
+ 826 - 821
src/components/supermap.vue


+ 19 - 14
src/views/eventdetailsdialog.vue

@@ -37,7 +37,6 @@
                                v-for="(item,index) in resourcesList">
                             <div class="iconfont icon icon-normal" :class="item.icon"></div>
                             <div class="icon-text">
-                              <h6>{{ item.count }}</h6>
                               <h5>{{ item.resourceName }}</h5>
                             </div>
                           </div>
@@ -52,11 +51,13 @@
                    </div> -->
                 <!-- 底部工具栏end -->
                 <!-- 地图 -->
-                <supermapDialog ref="supermapDialog" :dynamicPlotting="true"
+                <supermapDialog ref="supermapDialog"
                                 style="position: absolute; top:0;left: 0;"
                                 :mapDiv="'forestWarmSuperMap'"
-                                :mapSite="{doubleClickZoom:false}" :codes="['9fa5']"
-                                :isSideBySide="false"></supermapDialog>
+                                :mapSite="{zoom:16,doubleClickZoom:false,dragging:false,scrollWheelZoom:false}"
+                                :codes="['9fa5']"
+                                :isSideBySide="false"
+                                :isdynamicPlotting="true"/>
                 <!-- 地图end -->
               </div>
             </el-col>
@@ -71,7 +72,7 @@
                       <div class="this-con h-45">
                         <div class="z-info-list" style="margin-top: 0;">
                           <el-timeline>
-                            <el-timeline-item color="#2bacf7" timestamp="2018/4/12"
+                            <el-timeline-item color="#2bacf7" :timestamp="item.createTime"
                                               placement="top" v-for="(item,index) in eventlog">
                               <el-card>
                                 <div class="z-info-list-con">
@@ -164,7 +165,7 @@ export default {
   },
   data() {
     return {
-      eventlog:[],
+      eventlog: [],
       eventDialog: false,
       resourcesList: [{
         resourceName: '取水口',
@@ -221,16 +222,16 @@ export default {
   methods: {
     cancelEventShow() {
       console.log('关闭事件弹窗')
-      this.eventlog=[];
+      this.eventlog = []
     },
     showEventDialog(eventCode) {
       let that = this
       //获取事件详情
       getEventDetail({ eventCode: eventCode }).then(res => {
         this.eventDialog = true
-        this.eventlog=res.data.eventlog
+        this.eventlog = res.data.eventlog
         console.log(this.eventlog)
-        if(res.data.catalogue!=null&&res.data.catalogue.length>0){
+        if (res.data.catalogue != null && res.data.catalogue.length > 0) {
           let markersMap = {
             lng: 124.59,
             lat: 43.02,
@@ -240,28 +241,30 @@ export default {
             parameter: '',
             keepBindPopup: false,
             isAggregation: false,
-            radius:0
+            radius: 0
           }
           if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_1' || res.data.catalogue[0].eventStatusValue == 'forest_event_status_2' || res.data.catalogue[0].eventStatusValue == 'forest_event_status_3') {
             markersMap.icon = 'sj-icon-map-clz'
             markersMap.isAggregation = false
           } else if (res.data.catalogue[0].eventStatusValue == 'event_event_status_4') {
             markersMap.icon = 'sj-icon-map-wcl'
-          }else if (res.data.catalogue[0].eventStatusValue == 'event_event_status_5') {
+          } else if (res.data.catalogue[0].eventStatusValue == 'event_event_status_5') {
             markersMap.icon = 'sj-icon-map-wcl'
-          }else if (res.data.catalogue[0].eventStatusValue == 'event_event_status_6') {
+          } else if (res.data.catalogue[0].eventStatusValue == 'event_event_status_6') {
             markersMap.icon = 'sj-icon-map-wcl'
           } else {
             markersMap.icon = 'sj-icon-map-ywc'
           }
           markersMap.lng = res.data.catalogue[0].longitude
           markersMap.lat = res.data.catalogue[0].latitude
-          if(res.data.eventdetail!=null&&res.data.eventdetail.length>0&&res.data.eventdetail[0].fireRadius!=null&&res.data.eventdetail[0].fireRadius!=""&&res.data.eventdetail[0].fireRadius>0){
+          if (res.data.eventdetail != null && res.data.eventdetail.length > 0 && res.data.eventdetail[0].fireRadius != null && res.data.eventdetail[0].fireRadius != '' && res.data.eventdetail[0].fireRadius > 0) {
             markersMap.radius = res.data.eventdetail[0].fireRadius
           }
           setTimeout(() => {
+            that.$refs.supermapDialog.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
             that.$refs.supermapDialog.clearM(false)
             that.$refs.supermapDialog.setMarkersRadius([markersMap])
+            that.$refs.supermapDialog.dropLocation(res.data.catalogue[0].latitude, res.data.catalogue[0].longitude)
           }, 1000)
         }
       })
@@ -272,7 +275,9 @@ export default {
       const canvas = document.createElement('canvas')
       // 获取父标签,意思是这个标签内的 DOM 元素生成图片
       // imageTofile是给截图范围内的父级元素自定义的ref名称
-      let canvasBox = this.$refs.imageTofile
+      // let canvasBox = this.$refs.imageTofile
+      let canvasBox = document.getElementById('forestWarmSuperMap')
+      console.log(canvasBox)
       // 获取父级的宽高
       const width = parseInt(window.getComputedStyle(canvasBox).width)
       const height = parseInt(window.getComputedStyle(canvasBox).height)

+ 4 - 4
src/views/forest.vue

@@ -105,7 +105,7 @@
       <!-- 地图 -->
       <supermap ref="supermap" style="width: 100%;height: 100vh;" :mapDiv="'forestMap'" :dynamicPlotting="false"
                 :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"
-                @showEventDialog="showEventDialog"></supermap>
+                @showEventDialog="showEventDialog"/>
       <!-- 右侧 -->
       <div class="rightbar rightbar-index" ref="right">
         <div class="right-item1">
@@ -863,7 +863,7 @@ export default {
    			this.$refs.bottomMenu.showChangChild = false
           if (!this.$refs.bottomMenu.showBanChild) {
             this.$refs.bottomMenu.showBanChild = false
-          } 
+          }
         }else if (click == 'forestchang') {
        		this.$refs.bottomMenu.showChangChild = true
           this.$refs.supermap.isEditableLayers = false
@@ -871,9 +871,9 @@ export default {
        		this.$refs.bottomMenu.showChild = false
           if (!this.$refs.bottomMenu.showChangChild) {
             this.$refs.bottomMenu.showChangChild = false
-          } 
+          }
         }
-       			
+
       },
     //选择图层
     choseLayerSwitching(url) {