浏览代码

Merge remote-tracking branch 'origin/visu_emergency_01_siping_2.5d' into visu_emergency_01_siping_2.5d

王通 2 年之前
父节点
当前提交
22e2d4acb7

+ 7 - 7
public/index.html

@@ -276,6 +276,13 @@
 <!--<script src="h5player/h5player.min.js"></script>-->
 
 
+<script type="text/javascript" src="./SuperMap3D/Build/Cesium/Cesium.js"></script>
+<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/tooltip.js"></script>
+<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/bubble/popup.js"></script>
+<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/jquery.min.js"></script>
+<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/config.js"></script>
+<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/bootstrap-select.min.js"></script>
+<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/supermap/SuperMap.Include.js"></script>
 
 <!--  <link rel="stylesheet" href="./supermap/libs/plotting/leaflet/10.2.1/iclient-plot-leaflet.css">-->
 <script type="text/javascript"
@@ -288,13 +295,6 @@
 <script type="text/javascript" include="PlotPanel,StylePanel,SMLInfosPanel,iPortalStylePanel"
         src="./supermap/examples/js/plottingPanel/PlottingPanel.Include.js"></script>
 
-<script type="text/javascript" src="./SuperMap3D/Build/Cesium/Cesium.js"></script>
-<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/tooltip.js"></script>
-<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/bubble/popup.js"></script>
-<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/jquery.min.js"></script>
-<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/config.js"></script>
-<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/bootstrap-select.min.js"></script>
-<script type="text/javascript" src="./SuperMap3D/examples/webgl/js/supermap/SuperMap.Include.js"></script>
 <div id="app">
   <div class="loading">
     <div><span></span></div>

+ 5 - 0
src/api/components/supermap.js

@@ -54,4 +54,9 @@ export const iconList = {
   'sj-icon-map-centerdata_t_forest_firehydrant@1': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@1.png'),//地上消防栓
   'sj-icon-map-centerdata_t_forest_firehydrant@2': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@2.png'),//地下消防栓
   'sj-icon-map-centerdata_t_forest_firehydrant@3': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@3.png'),//室内消防栓
+
+  //云图图标
+  'sj-icon-map-centerdata-t-forest-firehydrant@1': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@1.png'),//地上消防栓
+  'sj-icon-map-centerdata-t-forest-firehydrant@2': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@2.png'),//地下消防栓
+  'sj-icon-map-centerdata-t-forest-firehydrant@3': require('@/assets/icons/sj-icon-map/centerdata/sj-icon-map-centerdata_t_forest_firehydrant@3.png'),//室内消防栓
 }

+ 20 - 0
src/api/forest.js

@@ -1,5 +1,25 @@
 import request from '@/utils/request'
 
+// 获取消防左侧菜单列表
+export function fireControlViewList() {
+  return request({
+    url: '/center-firecontrol/VisuForestDataCenterController/fireControlViewList',
+    method: 'post',
+  })
+}
+// 点击左侧菜单列表查询落点
+export function fireControlViewPoint(type, name) {
+  return request({
+    url: '/center-firecontrol/VisuForestDataCenterController/fireControlViewPoint',
+    method: 'post',
+    data:{
+      // "name": name,
+      "type": type
+    }
+  })
+}
+
+
 // 获取绑定的事件类型
 export function getMenuEventType() {
   return request({

文件差异内容过多而无法显示
+ 219 - 12
src/assets/iconfont/demo_index.html


文件差异内容过多而无法显示
+ 42 - 6
src/assets/iconfont/iconfont.css


文件差异内容过多而无法显示
+ 1 - 1
src/assets/iconfont/iconfont.js


+ 65 - 2
src/assets/iconfont/iconfont.json

@@ -6,6 +6,69 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "12770896",
+      "name": "垃圾桶",
+      "font_class": "centerdata-t-hydraulic-garbage-station",
+      "unicode": "e658",
+      "unicode_decimal": 58968
+    },
+    {
+      "icon_id": "35584502",
+      "name": "河道蓝线资源",
+      "font_class": "centerdata-t-hydraulic-channel-blueline",
+      "unicode": "e657",
+      "unicode_decimal": 58967
+    },
+    {
+      "icon_id": "2116699",
+      "name": "河流面",
+      "font_class": "centerdata-t-hydraulic-river",
+      "unicode": "e652",
+      "unicode_decimal": 58962
+    },
+    {
+      "icon_id": "2777434",
+      "name": "桥梁工程",
+      "font_class": "centerdata-t-hydraulic-wade-bridge-culvert",
+      "unicode": "e654",
+      "unicode_decimal": 58964
+    },
+    {
+      "icon_id": "4274470",
+      "name": "闸门信息",
+      "font_class": "centerdata-t-hydraulic-water-gate",
+      "unicode": "e655",
+      "unicode_decimal": 58965
+    },
+    {
+      "icon_id": "9400975",
+      "name": "推土机",
+      "font_class": "centerdata-t-hydraulic-battlefield",
+      "unicode": "e703",
+      "unicode_decimal": 59139
+    },
+    {
+      "icon_id": "9466856",
+      "name": "河长制河段",
+      "font_class": "centerdata-t-hydraulic-reach",
+      "unicode": "e670",
+      "unicode_decimal": 58992
+    },
+    {
+      "icon_id": "11858519",
+      "name": "排污口",
+      "font_class": "centerdata-t-hydraulic-outlet-sewage",
+      "unicode": "e656",
+      "unicode_decimal": 58966
+    },
+    {
+      "icon_id": "13956683",
+      "name": "水库",
+      "font_class": "centerdata-t-hydraulic-reservoir",
+      "unicode": "e6b3",
+      "unicode_decimal": 59059
+    },
+    {
       "icon_id": "6850817",
       "name": "三角警示",
       "font_class": "centerdata-t-traffic-warning-sign",
@@ -246,7 +309,7 @@
     {
       "icon_id": "21492584",
       "name": "5饲料",
-      "font_class": "farmenterprise_2",
+      "font_class": "farmenterprise_3",
       "unicode": "e67a",
       "unicode_decimal": 59002
     },
@@ -281,7 +344,7 @@
     {
       "icon_id": "11831137",
       "name": "菜刀",
-      "font_class": "farmenterprise_3",
+      "font_class": "farmenterprise_2",
       "unicode": "e731",
       "unicode_decimal": 59185
     },

文件差异内容过多而无法显示
+ 20 - 2
src/assets/iconfont/iconfont.svg


二进制
src/assets/iconfont/iconfont.ttf


二进制
src/assets/iconfont/iconfont.woff


二进制
src/assets/iconfont/iconfont.woff2


+ 291 - 253
src/components/supermap-2.5d.vue

@@ -1,275 +1,313 @@
 <template>
-    <div id="cesium-container" style="width: 100%; height: 100%;background: none;">
-
-    </div>
-
+  <div id="cesiumContainer" style="width: 100%; height: 100%;background: none;" />
 </template>
-<script>
-  import {
-    iconList,
-  } from '@/api/components/supermap.js'
-	export default {
-		name: 'sookaSuperMap',
-		data() {
-			return {
-        viewer:null,
-        scene:null,
-        handler:null,
-
-        pick:null,
-        back_position:null,
-        content:null,
-        stkTerrainProvider:null,
 
-        aac:null,//定时
-        /*************************原地图属性*********************/
-        isEditableLayers: false, //绘图控件
+<script>
+import {
+  iconList,
+  getDeviceList
+} from '@/api/components/supermap.js'
+import Cookies from 'js-cookie'
+import { getConfigKey } from "@/api/system/config";
+export default {
+  name: 'supermap-2.5d',
+  data() {
+    return {
+      superMapRootUrl:null,
+      layerList:[],
+      viewer:null,
+      scene:null,
+      handler:null,
+      pick:null,
+      back_position:null,
+      content:null,
+      mvtMap0:null,
+      shuixi_name:null,
+      mvtMap1:null,
+      mvtMap2:null,
+      mvtMap3:null,
+      road_name:null,
+      layer_xiangzhenjie_name:null,
+      /*************************原地图属性*********************/
+      isEditableLayers: false, //绘图控件
 
-        /*************************原地图属性*********************/
-      }
-		},
-		watch: {
+      /*************************原地图属性*********************/
+      aac:null,
+      queryParams: {
+        name:null,
+        mapData: null,
+        mapName: null
+      },
+    }
+  },
+  watch: {},
+  created() {
+    this.superMapInfo();
+  },
+  mounted() {
+  },
+  props: {},
+  methods: {
+    superMapInfo(){
+      getConfigKey('superMap.iServer').then(response => {
+        this.superMapRootUrl = response.msg;
+        this.onload();
+      })
     },
-		mounted() {
-      this.viewer = new Cesium.Viewer('cesium-container')
-      //添加SuperMap iServer发布的影像服务
-      // var layer = this.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
-      //   url: 'http://121.36.228.94:8090/iserver/services/3D-sipingchangjing/rest/realspace'
-      // }));
-      // //添加SuperMap iServer发布的影像服务
-      // var layer1 = this.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
-      //   url: 'http://121.36.228.94:8090/iserver/services/map-spyx4326/rest/maps/dem'
-      // }));
-
-      this.scene = this.viewer.scene;
-      this.scene.lightSource.ambientLightColor = new Cesium.Color(0.65, 0.65, 0.65, 1);
-      var urlStr = 'http://121.36.228.94:8090/iserver/services/3D-sipingchangjing/rest/realspace';
-      this.scene.open(urlStr);
-
-      //将三维球定位到指定位置,camera是相机,是当前视野范围相机
-      //destination是相机的目标位置,参数是经度、纬度、高度
-      //orientation是相机朝向
-      //    heading-代表镜头左右方向,正值为右,负值为左
-      //    pitch-代表镜头上下方向,正值为上,负值为下.
-      //    roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
-      this.viewer.camera.flyTo({
-        destination: Cesium.Cartesian3.fromDegrees(124.5465087890625, 43.0869197845459, 25000),
-        orientation: {
-          heading :  Cesium.Math.toRadians(348.4202942851978),
-          pitch : Cesium.Math.toRadians(-30.74026687972041),
-          roll : Cesium.Math.toRadians(0)
+    onload(){
+      let that = this;
+      //1.添加地形数据
+      that.viewer = new Cesium.Viewer('cesiumContainer',{
+        //创建地形服务提供者的实例,url为SuperMap iServer发布的TIN地形服务
+        terrainProvider : new Cesium.CesiumTerrainProvider({
+          url :that.superMapRootUrl+"/3D-sipingchangjing/rest/realspace/datas/dem@spyx4326",
+          //isSct : false,//地形服务源自SuperMap iServer发布时需设置isSct为true
+          invisibility:true
+        }),
+        infoBox:true,
+        navigation: false
+      }, {
+        contextOptions: {
+          msaaLevel: 4,
+          requestWebgl2: true
         },
-        complete:function callback() {
-          // 定位完成之后的回调函数
-
-        }
+        orderIndependentTranslucency: false
       });
-    },
-		props: {},
-		methods: {
-      //移除之前添加的点
-      clearM(){
-        this.viewer.entities.removeAll();
-      },
-      /**
-       * 地图落点
-       */
-      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;
-          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();
-        that.createRightClickDescription();
-      },
-      /**
-       *鼠标左击事件是原来的气泡
-       */
-      createLeftClickDescription() {
-        let that = this;
-        that.handler.setInputAction(function (movement) {
-        }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
-      },
-      /**
-       * 地图落点(传感器)
-       */
-      setMarkers_cgq(makerList){
-        let that = this;
-        that.handler = new Cesium.ScreenSpaceEventHandler(this.scene.canvas);
+      that.scene = that.viewer.scene;
+      that.viewer.cesiumWidget.creditContainer.style.display = "none" // 去掉超图logo水印
 
-        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() {
-        let that = this;
-        that.handler.setInputAction(function (movement) {
-          // 监听鼠标的当前位置坐标,然后根据当前坐标去动态更新气泡窗口div的显示位置;
-          that.pick = that.viewer.scene.pick(movement.position);
-          if (that.pick && that.pick) {
-            let id = Cesium.defaultValue(that.viewer.scene.pick(movement.position).id, that.viewer.scene.pick(movement.position).primitive.id);
-            let clickName = id._click;
-            that.$emit(clickName, id._parameter)
+      //2.添加SuperMap iServer发布的影像服务
+      let layer = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
+        url : that.superMapRootUrl+"/3D-sipingchangjing/rest/realspace/datas/siping_2m@spyx4326",
+      }));
+
+      //飞行值坐标点,每3秒推进一级
+      //heading-代表镜头左右方向,正值为右,负值为左
+      //pitch-代表镜头上下方向,正值为上,负值为下.
+      //roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
+      setTimeout(function() {
+        that.viewer.camera.flyTo({
+          destination: Cesium.Cartesian3.fromDegrees(124.49980650138238, 43.428263986216815, 950000),
+          orientation: {
+            // heading :  Cesium.Math.toRadians(346.4202942851978),
+            // pitch : Cesium.Math.toRadians(-56.74026687972041),
+            // roll : Cesium.Math.toRadians(0)
           }
-        }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
-      },
-      /**
-       * 落点定位
-       */
-      dropLocation(lat, lng) {
-        this.viewer.camera.flyTo({
-          destination: Cesium.Cartesian3.fromDegrees(lng, lat, 3000),
         });
-      },
-    }
-	}
-</script>
 
-<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;
-  }
+      }, 3000);
+      setTimeout(function() {
+        that.viewer.camera.flyTo({
+          destination: Cesium.Cartesian3.fromDegrees(124.49980650138238, 43.428263986216815, 650000),
+          orientation: {
+            // heading :  Cesium.Math.toRadians(346.4202942851978),
+            // pitch : Cesium.Math.toRadians(-56.74026687972041),
+            // roll : Cesium.Math.toRadians(0)
+          }
+        });
 
-  #test .divpoint {
-    background: url(../../public/SuperMap3D/examples/webgl/images/qipao1.png) no-repeat;
-    background-size: cover;
-    width: 128px;
-    height: 216px;
-  }
+      }, 3000);
+      setTimeout(function() {
+        that.viewer.camera.flyTo({
+          destination: Cesium.Cartesian3.fromDegrees(124.49980650138238, 43.428263986216815, 350000),
+          orientation: {
+            // heading :  Cesium.Math.toRadians(346.4202942851978),
+            // pitch : Cesium.Math.toRadians(-56.74026687972041),
+            // roll : Cesium.Math.toRadians(0)
+          }
+        });
 
-  #test3 .divpoint {
-    background: url(../../public/SuperMap3D/examples/webgl/images/qipao1.png) no-repeat;
-    background-size: cover;
-    width: 230px;
-    height: 150px;
-  }
+      }, 3000);
 
-  #test .label-wrap {
-    display: flex;
-    justify-content: center;
-    align-content: center;
-    height: 50px;
-  }
+      //开始加载专题图等数据,8秒后开始执行
+      setTimeout(function() {
+        // // 3.水系
+        // let shuixi = that.superMapRootUrl+"/map-mvt-shuixiMian/restjsr/v1/vectortile/maps/shuixi_Mian";
+        // that.mvtMap0 = that.scene.addVectorTilesMap({
+        //   url: shuixi,
+        //   canvasWidth: 512,
+        //   name: 'mvt_map0',
+        //   viewer: that.viewer,
+        //   selectedColor:new Cesium.Color(6,169,254,0.5),
+        //   show:true,
+        // });
 
-  #test3 .label-wrap {
-    padding-left: 100px;
-    padding-top: 8px;
-    box-sizing: border-box;
-  }
+        // //4.林地
+        // let lindi = that.superMapRootUrl+"/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi";
+        // that.mvtMap1 = that.scene.addVectorTilesMap({
+        //   url: lindi,
+        //   canvasWidth: 512,
+        //   name: 'mvt_map1',
+        //   viewer: that.viewer,
+        //   selectedColor:new Cesium.Color(6,254,181,0.5),
+        //   show:true,
+        // });
+        //
+        // //5.农田
+        // let nongtian = that.superMapRootUrl+"/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian";
+        // that.mvtMap2 = that.scene.addVectorTilesMap({
+        //   url: nongtian,
+        //   canvasWidth: 512,
+        //   name: 'mvt_map2',
+        //   viewer: that.viewer,
+        //   selectedColor:new Cesium.Color(250, 236, 246,1.0),
+        //   show:true,
+        // });
+        //
+        // //6.路网
+        // let road = that.superMapRootUrl+"/map-mvt-roadXian/restjsr/v1/vectortile/maps/road_Xian";
+        // that.mvtMap3 = that.scene.addVectorTilesMap({
+        //   url: road,
+        //   canvasWidth: 512,
+        //   name: 'mvt_map3',
+        //   viewer: that.viewer,
+        //   show:true,
+        // });
+        //
+        // //7.添加路网NAME
+        // let road_name_url = that.superMapRootUrl+'/3D-road_Name_S/rest/realspace';
+        // that.road_name = that.scene.open(road_name_url);
+        //
+        // // 8.添加水系NAME
+        // let shuixi_name_url = that.superMapRootUrl+'/3D-shuixi_Name/rest/realspace';
+        // that.shuixi_name = that.scene.open(shuixi_name_url);
 
-  #test .pop-title {
-    color: #fff;
-    margin-top: 11px;
-    margin-bottom: 4px;
-    display: flex;
-    align-items: center;
-    font-size: 18px;
-  }
+        //9.添加乡镇界
+        let layer_xiangzhenjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
+          url : that.superMapRootUrl+"/map-SIPING/rest/maps/XiangZhenJie",
+        }));
 
+        //10.添加县界
+        let layer_xianjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
+          url : that.superMapRootUrl+"/map-SIPING/rest/maps/XianJie",
+        }));
 
-  #test .data-li {
-    font-size: 14px;
-    margin-top: 15px;
-    margin-bottom: 5px;
-  }
+        //11.添加县界名称 此处要先添加县界名称 否则县界名会不显示
+        let layer_xianjie_name = that.superMapRootUrl+'/3D-XianJie_Name/rest/realspace';
+        that.scene.open(layer_xianjie_name);
 
-  #test3 .data-li {
-    font-size: 14px;
-    margin-top: 6px;
-  }
+        //12.添加乡镇界名称
+        let layer_xiangzhenjie_name = that.superMapRootUrl+'/3D-XiangZhenJie_Name/rest/realspace';
+        that.scene.open(layer_xiangzhenjie_name);
 
-  #test2 .divpoint {
-    background: url(../../public/SuperMap3D/examples/webgl/images/qipao1.png) no-repeat;
-    background-size: cover;
-    width: 116px;
-    height: 120px;
-  }
+      }, 3000);
 
-  #test2 .label-wrap {
-    box-sizing: border-box;
-    padding-top: 10px;
-    padding-left: 51px;
-  }
+    },
+    //移除之前添加的点
+    clearM(){
+      this.viewer.entities.removeAll();
+    },
+    /**
+     * 地图落点
+     */
+    setMarkers(makerList){
+      let that = this;
+      that.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
+      clearInterval(that.aac);
+      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();
+      that.createRightClickDescription();
+    },
+    /**
+     *鼠标左击事件是原来的气泡
+     */
+    createLeftClickDescription() {
+      let that = this;
+      that.handler.setInputAction(function (movement) {
+      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+    },
+    /**
+     *鼠标右击事件是原来的点击
+     */
+    createRightClickDescription() {
+      let that = this;
+      that.handler.setInputAction(function (movement) {
+        // 监听鼠标的当前位置坐标,然后根据当前坐标去动态更新气泡窗口div的显示位置;
+        that.pick = that.viewer.scene.pick(movement.position);
+        if (that.pick && that.pick) {
+          let id = Cesium.defaultValue(that.viewer.scene.pick(movement.position).id, that.viewer.scene.pick(movement.position).primitive.id);
+          let clickName = id._click;
+          that.$emit(clickName, id._parameter)
+        }
+      }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
+    },
+    /**
+     * 地图落点(传感器)
+     */
+    setMarkers_cgq(makerList){
+      let that = this;
+      that.handler = new Cesium.ScreenSpaceEventHandler(this.scene.canvas);
 
-</style>
+      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);
+    },
+    /**
+     * 落点定位
+     */
+    dropLocation(lat, lng) {
+      this.viewer.camera.flyTo({
+        destination: Cesium.Cartesian3.fromDegrees(lng, lat, 3000),
+      });
+    },
+  },
+}
+</script>

+ 2 - 2
src/router/index.js

@@ -31,7 +31,7 @@ import Layout from '@/layout'
 // 公共路由(可视化首页头部链接)
 export const constantRoutes = [{
 		path: '/',
-		redirect: 'datacenter',
+		redirect: 'forest',
 	},
 	{
 		path: '/forest',
@@ -88,7 +88,7 @@ export const constantRoutes = [{
 // 公共路由
 export const constantRoutesNew = [{
 		path: '/',
-		redirect: 'datacenter',
+		redirect: 'forest',
 	},
 	{
 		path: '/forest',

+ 98 - 9
src/views/eventdetailsdialog.vue

@@ -1,11 +1,9 @@
 <template>
   <div class="visual-con">
-    <!--头部-->
-    <vheader></vheader>
     <!--主体-->
     <div class="visual-body">
       <button @click="showEventDialog"
-              style="position: absolute; left:50%;top: 50vh; transform: translateX(-50%);">触发事件详情
+              style="position: absolute; left:50%;top: 50vh; transform: translateX(-50%);">
       </button>
       <!-- 弹层 -->
       <el-dialog title="事件详情" :visible.sync="eventDialog" customClass="customWidth" v-if="eventDialog"
@@ -39,7 +37,7 @@
                       <div class="i-list-con">
                         <div class="d-l-con-icon" style="flex-direction:row;flex-wrap: nowrap;">
                           <div class="icon-con" style="width: fit-content !important;"
-                               v-for="(item,index) in resourcesList" @click="listResourceByWz(item.type)">
+                               v-for="(item,index) in resourcesList" @click="fireControlViewPoint(item.type)">
                             <div class="iconfont icon icon-normal" :class="item.icon"></div>
                             <div class="icon-text">
                               <h5>{{ item.resourceName }}</h5>
@@ -1049,13 +1047,14 @@
 <script>
 import html2canvas from 'html2canvas'//截图组件
 import supermapDialog from '@/components/supermap' //超图
-import vheader from '@/components/v-header.vue' //一体化共用头部
 import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
 import eventLogUpload from '@/views/eventLogUpload.vue' //日志上传文件
 import areaSupermap from '@/components/supermap'//区域标记地图
 import TcPlayer from '@/components/TcPlayer' //视频预览
 import findUserByDept from '@/views/findUserByDept' //责任人选择弹框
 import {
+  fireControlViewPoint,
+  fireControlViewList,
   getEventDetail,
   sendEventLog,
   listSJfl,
@@ -1098,7 +1097,6 @@ export default {
     }
   },
   components: {
-    vheader,
     vBottomMenu,
     supermapDialog,
     eventLogUpload,
@@ -1246,6 +1244,7 @@ export default {
       eventType: null,//事件类型-大类
       eventTypeXl: null,//事件类型-小类
       statusFlag: null,//事件流程按钮
+      dataStatus: null,//不知道谁写的没定义报错了
       deptId: null,//事件流程部门
       eventCode: null,
       eventName: null,
@@ -1322,12 +1321,45 @@ export default {
     calendarDay: null//首页日历选择
   },
   created() {
+    // 获取消防左侧菜单列表
+    this.fireControlViewList();
     /** ----------------------------------摄像头预览开始------------------------------------- */
     const DHWsInstance = DHWs.getInstance()
     this.ws = DHWsInstance
     /** ----------------------------------摄像头预览结束------------------------------------- */
   },
   methods: {
+    // 获取消防左侧菜单列表
+    fireControlViewList() {
+      this.resourcesList = [];
+      let _this = this;
+      // {
+      //   resourceName: '取水口',
+      //     type: 'qsk',
+      //   count: '1',
+      //   icon: 'sj-icon-waterintake'
+      // },
+      fireControlViewList().then(function (res) {
+        // _this.resourcesList = res.data
+        //截取data.resourceTable字段中“_”分隔符最后一个作为关键字,重新拼接成前端需要的图标:class,格式sj-icon-xxxx,将其set回原数组
+        res.data.forEach(function (data, index) {
+          let obj = {};
+          let icon ='sj' + '-' + 'icon' + '-' + data.type.replaceAll("_", "-").replaceAll("@", "-");
+          obj.resourceName = data.name.replaceAll("(个)", "");
+          obj.type = data.type;
+          obj.count = data.num;
+          obj.icon = icon;
+          _this.resourcesList.push(obj);
+          console.log("icon_" + (index + 1) + "=", icon);
+        })
+        _this.resourcesList.push({
+          resourceName: '摄像头',
+          type: 'sxt',
+          count: '1',
+          icon: 'sj-icon-jkzx'
+        })
+      })
+    },
     /************************************责任制-开始****************************************/
     //初始化责任制数据列表
     initDutysystemTableData(){
@@ -1484,6 +1516,62 @@ export default {
         })
       }
     },
+    fireControlViewPoint(type) {
+      // alert(type)
+      if (this.resourcesListCheck.indexOf(type) > -1) {
+        this.resourcesListCheck.splice(this.resourcesListCheck.indexOf(type), 1)
+        setTimeout(() => {
+          this.$refs.supermapDialog.clearMByType(type)
+        }, 1000)
+      } else {
+        // 消防资源落点
+        let param = { longitude: this.longitude, latitude: this.latitude, type: type, radius: this.radius }
+        if (type != 'sxt') {
+          fireControlViewPoint(type).then(res => {
+            if (res.data != null && res.data.pointList.length > 0) {
+              this.resourcesListCheck.push(type)
+              var markersList = []
+              for (let i = 0; i < res.data.pointList.length; i++) {
+                let markersMap = {
+                  lng: 124.59,
+                  lat: 43.02,
+                  icon: 'marker',
+                  bindPopupHtml: '',
+                  click: '',
+                  parameter: '',
+                  keepBindPopup: false,
+                  isAggregation: true
+                }
+                if (res.data.pointList.length > 50) {
+                  markersMap.isAggregation = true
+                }
+                // centerdata_t_firecontrol_basic_linkage_force
+                // sj-icon-map-centerdata-t-firecontrol-basic-linkage-force
+                markersMap.icon = 'sj-icon-map-' + type.replaceAll("_", "-");
+                // alert(res.data.pointList[i].longitude)
+                markersMap.lng = res.data.pointList[i].longitude;
+                markersMap.lat = res.data.pointList[i].latitude;
+                markersMap.bindPopupHtml = '<div class="map-tip">' +
+                  '<span>' +
+                  '                  <div class="d-l-con">' +
+                  '                  <div class="d-l-l-text">' +
+                  '                  <h4>资源名称:' + res.data.pointList[i].name + '</h4>' +
+                  '                </div>' +
+                  '                </div>' +
+                  '                </span>' +
+                  '</div>'
+                markersList.push(markersMap)
+              }
+              setTimeout(() => {
+                this.$refs.supermapDialog.setMarkersByType(markersList, type)
+              }, 1000)
+            }
+          })
+        }else {
+          this.listResourceByWz(type);
+        }
+      }
+    },
     listResourceByWz(type) {
       if (this.resourcesListCheck.indexOf(type) > -1) {
         this.resourcesListCheck.splice(this.resourcesListCheck.indexOf(type), 1)
@@ -1529,9 +1617,10 @@ export default {
                 markersMap.icon = 'camera'
                 if (res.data[i].cameraCode != null) {
                   markersMap.click = 'preview'
-                  // markersMap.parameter = res.data[i].cameraCode
-                  markersMap.parameter = {code:res.data.data[i].cameraCode,
-                    type:res.data.data[i].cameraFactory}
+                  markersMap.radius = 0
+                  markersMap.parameter = {code:res.data[i].cameraCode,
+                    type:res.data[i].cameraFactory?res.data[i].cameraFactory:1}
+                    // type:1}//res.data[i].cameraFactory
                 }
               }
               markersMap.lng = res.data[i].longitude

+ 1 - 5
src/views/firespread.vue

@@ -1,11 +1,9 @@
 <template>
   <div class="visual-con">
-    <!--头部-->
-    <vheader></vheader>
     <!--主体-->
     <div class="visual-body">
       <button @click="showEventDialog"
-              style="position: absolute; left:50%;top: 50vh; transform: translateX(-50%);">触发事件详情
+              style="position: absolute; left:50%;top: 50vh; transform: translateX(-50%);">
       </button>
       <!-- 弹层 -->
       <el-dialog title="事件详情" :visible.sync="eventDialog" customClass="customWidth" v-if="eventDialog"
@@ -947,7 +945,6 @@
 <script>
   import html2canvas from 'html2canvas'//截图组件
   import supermapDialog1 from '@/components/supermap' //超图
-  import vheader from '@/components/v-header.vue' //一体化共用头部
   import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
   import eventLogUpload from '@/views/eventLogUpload.vue' //日志上传文件
   import areaSupermap from '@/components/supermap'//区域标记地图
@@ -991,7 +988,6 @@
       }
     },
     components: {
-      vheader,
       vBottomMenu,
       supermapDialog1,
       eventLogUpload,

+ 2 - 2
src/views/forest.vue

@@ -820,8 +820,8 @@ export default {
       //左侧获取部门信息
       getBaseInfo().then(res => {
         if (res.code == 200) {
-          if (res.msg == '未找到部门信息') {
-            this.forestInfo = '未找到部门信息!'
+          if (res.msg == '暂无特色信息') {
+            this.forestInfo = '暂无特色信息!'
           } else {
             this.forestInfo = res.data.baseinfo //基本情况
           }

+ 2 - 2
src/views/monitor.vue

@@ -220,8 +220,8 @@ export default {
     this.bottomMenuList() //获取底部公共组件消息和任务
     this.getTreeselect()
     this.deptId = Cookies.get("deptId")
-    this.getSensorListByDeptId()
-    this.getDlblistBydeptId()
+    // this.getSensorListByDeptId()
+    // this.getDlblistBydeptId()
     this.selectDeviceType()
   },
   data() {