Selaa lähdekoodia

事件详情地图

彭宇 2 vuotta sitten
vanhempi
commit
c7befa48bd
3 muutettua tiedostoa jossa 32 lisäystä ja 7 poistoa
  1. 13 2
      src/assets/styles/base.scss
  2. 2 2
      src/components/supermap.vue
  3. 17 3
      src/views/eventdetailsdialog.vue

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

@@ -489,7 +489,6 @@ div::-webkit-scrollbar {
 }
 
 //弹层样式
-
 .dia-event-info{
 	   .el-row{
 		    height: 75vh;
@@ -510,7 +509,7 @@ div::-webkit-scrollbar {
 				  z-index: 999;
 				  left:1rem;
 				  top: 1rem;
-				  
+
 
 		   		  .dia-left-top-tit{
 		   			  padding: .5rem;
@@ -2167,3 +2166,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;
+}

+ 2 - 2
src/components/supermap.vue

@@ -842,7 +842,7 @@
 			text-shadow: 0 0 15px rgba($color: $inBlueHover, $alpha: 1.0);
 		}
 	}
-	
-	
+
+
 
 </style>

+ 17 - 3
src/views/eventdetailsdialog.vue

@@ -13,7 +13,7 @@
           <el-row>
             <!-- 左侧 -->
             <el-col :span="18" class="dia-left" >
-              <div ref="imageTofile">
+              <div ref="imageTofile" style="height: 75vh;">
               <!-- 应急预案 -->
               <div class="dia-left-top">
                 <div class="dia-left-top-tit">应急预案</div>
@@ -52,7 +52,7 @@
               <!-- 地图 -->
               <supermapDialog ref="supermapDialog"  :dynamicPlotting="true"
                               style="width:100% ;height: 75vh; position: absolute; top:0;left: 0;" :mapDiv="'forestWarmSuperMap'"
-                              :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview"
+                              :mapSite="{doubleClickZoom:false}" :codes="['9fa5']"
                               :isSideBySide="false"></supermapDialog>
               <!-- 地图end -->
               </div>
@@ -149,6 +149,14 @@ import html2canvas from "html2canvas";//截图组件
 import supermapDialog from '@/components/supermap' //超图
 import vheader from '@/components/v-header.vue' //一体化共用头部
 import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
+import {
+  getBaseInfo,
+  getTodayEvents,
+  getDeptEventCount,
+  getWeather,
+  getEventList
+} from '@/api/forest'
+
 export default {
   components: {
     vheader,
@@ -211,8 +219,11 @@ export default {
     }
   },
   methods: {
+    cancelEventShow(){
+      console.log("关闭事件弹窗")
+    },
     showEventDialog(id) {
-      alert(id)
+
       this.eventDialog = true
     },
     // 页面元素转图片
@@ -226,6 +237,9 @@ export default {
       // 获取父级的宽高
       const width = parseInt(window.getComputedStyle(canvasBox).width)
       const height = parseInt(window.getComputedStyle(canvasBox).height)
+      console.log(width)
+      console.log(height)
+
       // 宽高 * 2 并放大 2 倍 是为了防止图片模糊
       canvas.width = width * 2
       canvas.height = height * 2