wang_xy 2 yıl önce
ebeveyn
işleme
331799b9ff

+ 54 - 83
src/components/supermap-2.5d.vue

@@ -20,6 +20,8 @@
         back_position:null,
         content:null,
         stkTerrainProvider:null,
+
+        aac:null,//定时
         /*************************原地图属性*********************/
         isEditableLayers: false, //绘图控件
 
@@ -75,7 +77,7 @@
       setMarkers(makerList){
         let that = this;
         that.handler = new Cesium.ScreenSpaceEventHandler(this.scene.canvas);
-
+        clearInterval(that.aac);
         for (let i in makerList) {
           let longitude = makerList[i].lng;
           let latitude = makerList[i].lat;
@@ -107,6 +109,57 @@
         }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
       },
       /**
+       * 地图落点(传感器)
+       */
+      setMarkers_cgq(makerList){
+        let that = this;
+        that.handler = new Cesium.ScreenSpaceEventHandler(this.scene.canvas);
+
+        for (let i in makerList) {
+          let longitude = makerList[i].lng;
+          let latitude = makerList[i].lat;
+          that.viewer.entities.add({
+            name:"",
+            position: Cesium.Cartesian3.fromDegrees(longitude, latitude),
+            billboard: {
+              image: iconList[makerList[i].icon],
+              width: 48,
+              height: 48,
+              heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+              disableDepthTestDistance:Number.POSITIVE_INFINITY
+            },
+            description: makerList[i].bindPopupHtml,
+            click: makerList[i].click,
+            parameter: makerList[i].parameter,
+          });
+        }
+        that.viewer.scene.globe.depthTestAgainstTerrain=false;
+        that.createLeftClickDescription_cgq();
+      },
+      /**
+       *鼠标左击事件是原来的气泡(传感器)
+       */
+      createLeftClickDescription_cgq() {
+        let that = this;
+        clearInterval(that.aac);
+        that.handler.setInputAction(function (movement) {
+          that.aac = setInterval(function (){
+            let color = "green";
+            let value = Math.random();
+            let up = "▲";
+            let down = "▼";
+            if(value>0.5){
+              color = "red";
+              value = value +""+ up;
+            }else{
+              value = value +""+ down;
+            }
+            let html = "<span style='color:"+color+"'>当前传感器数值:"+value+"</span>";
+            window.parent.frames[0].document.querySelector(".cesium-infoBox-description").innerHTML = html;
+          },1000);
+        }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+      },
+      /**
        *鼠标右击事件是原来的点击
        */
       createRightClickDescription() {
@@ -136,87 +189,5 @@
 <style lang="scss" scoped>
 	@import '@/assets/styles/base.scss';
 
-  input[type=checkbox] {
-    margin: 0px 4px 0 0px;
-  }
-
-  label {
-    display: inline-block;
-  }
-
-  .param-container {
-    border: none;
-  }
-
-  .titleBox {
-    margin-bottom: 0px;
-  }
-
-  .sm-div-graphic {
-    position: absolute;
-    color: #fff;
-    font-size: 14px;
-  }
-
-  #test .divpoint {
-    background: url(../../public/SuperMap3D/examples/webgl/images/qipao1.png) no-repeat;
-    background-size: cover;
-    width: 128px;
-    height: 216px;
-  }
-
-  #test3 .divpoint {
-    background: url(../../public/SuperMap3D/examples/webgl/images/qipao1.png) no-repeat;
-    background-size: cover;
-    width: 230px;
-    height: 150px;
-  }
-
-  #test .label-wrap {
-    display: flex;
-    justify-content: center;
-    align-content: center;
-    height: 50px;
-  }
-
-  #test3 .label-wrap {
-    padding-left: 100px;
-    padding-top: 8px;
-    box-sizing: border-box;
-  }
-
-  #test .pop-title {
-    color: #fff;
-    margin-top: 11px;
-    margin-bottom: 4px;
-    display: flex;
-    align-items: center;
-    font-size: 18px;
-  }
-
-
-  #test .data-li {
-    font-size: 14px;
-    margin-top: 15px;
-    margin-bottom: 5px;
-  }
-
-  #test3 .data-li {
-    font-size: 14px;
-    margin-top: 6px;
-  }
-
-  #test2 .divpoint {
-    background: url(../../public/SuperMap3D/examples/webgl/images/qipao1.png) no-repeat;
-    background-size: cover;
-    width: 116px;
-    height: 120px;
-  }
-
-  #test2 .label-wrap {
-    box-sizing: border-box;
-    padding-top: 10px;
-    padding-left: 51px;
-  }
 
 </style>

+ 10 - 8
src/views/eventdetailsdialog.vue

@@ -64,13 +64,15 @@
                   </el-button>
                 </div>
                 <!-- 地图 -->
+                <!--<supermapDialog ref="supermapDialog"-->
+                                <!--style="position: absolute; top:0;left: 0;"-->
+                                <!--:mapDiv="'forestWarmSuperMap'"-->
+                                <!--:mapSite="{zoom:12,doubleClickZoom:false,dragging:false,scrollWheelZoom:false}"-->
+                                <!--:codes="['9fa5']"-->
+                                <!--:isSideBySide="false"-->
+                                <!--:isdynamicPlotting="true"-->
+                                <!--@preview="preview"/>-->
                 <supermapDialog ref="supermapDialog"
-                                style="position: absolute; top:0;left: 0;"
-                                :mapDiv="'forestWarmSuperMap'"
-                                :mapSite="{zoom:12,doubleClickZoom:false,dragging:false,scrollWheelZoom:false}"
-                                :codes="['9fa5']"
-                                :isSideBySide="false"
-                                :isdynamicPlotting="true"
                                 @preview="preview"/>
                 <!-- 地图end -->
               </div>
@@ -1068,12 +1070,12 @@
 
 <script>
 import html2canvas from 'html2canvas'//截图组件
-import supermapDialog from '@/components/supermap' //超图
+import supermapDialog from '@/components/supermap-2.5d' //超图
 import vheader from '@/components/v-header.vue' //一体化共用头部
 import TVWall from '@/components/TVWall.vue' //电视墙弹窗
 import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
 import eventLogUpload from '@/views/eventLogUpload.vue' //日志上传文件
-import areaSupermap from '@/components/supermap'//区域标记地图
+import areaSupermap from '@/components/supermap-2.5d'//区域标记地图
 import TcPlayer from '@/components/TcPlayer' //视频预览
 import findUserByDept from '@/views/findUserByDept' //责任人选择弹框
 import {

+ 10 - 10
src/views/forest.vue

@@ -9,7 +9,7 @@
       <div class="leftbar" ref="left">
         <!-- 1 基本情况 -->
         <div class="forthis">
-          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
             style="padding-bottom: 1rem;">
             <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
             <div class="this-title">
@@ -27,7 +27,7 @@
         </div>
         <!-- 2 事件统计-->
         <div class="forthis">
-          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
             style="padding-bottom: 1rem;">
             <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
             <div class="i-list-con h-29-5">
@@ -82,7 +82,7 @@
         </div>
         <!-- 3 组织机构 -->
         <div class="forthis">
-          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+          <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
             style="padding-bottom: 1rem;">
             <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
             <div class="i-list-con h-27" style="padding-left: 1rem;">
@@ -105,13 +105,13 @@
         </div>
       </div>
       <!-- 地图 -->
-      <supermap ref="supermap" style="width: 100%;height: 100vh;" ></supermap>
+      <supermap ref="supermap" style="width: 100%;height: 100vh;" @showEventDialog="showEventDialog"></supermap>
       <!-- 右侧 -->
       <div class="rightbar rightbar-index" ref="right">
         <div class="right-item1">
           <!-- 天气 -->
           <div class="forthis">
-            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']">
+            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" >
               <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
               <div class="i-list-con small-bottom-margin h-18">
                 <el-row :gutter="20" v-if="todatWeather">
@@ -240,7 +240,7 @@
           </div>
           <!-- 曝光台 -->
           <div class="forthis">
-            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
               style="padding-bottom: 1rem;">
               <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
               <div class="this-title">
@@ -268,7 +268,7 @@
           </div>
           <!-- 事件列表 -->
           <div class="forthis">
-            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
               style="padding-bottom: 1rem;">
               <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
               <div class="this-title">
@@ -362,7 +362,7 @@
         <div class="right-item2">
           <!-- 日历 -->
           <div class="forthis">
-            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
               style="padding-bottom: 1rem;">
               <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
               <div class="i-list-con small-bottom-margin h-30">
@@ -372,7 +372,7 @@
           </div>
           <!-- 事件分类 -->
           <div class="forthis">
-            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
               style="padding-bottom: 1rem;">
               <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
               <div class="this-title" style="cursor: pointer"
@@ -388,7 +388,7 @@
           </div>
           <!-- 上报排行 -->
           <div class="forthis">
-            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" :color="['#0c4b53', '#18caca']"
+            <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)"
               style="padding-bottom: 1rem;">
               <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;" />
               <div class="this-title">