瀏覽代碼

根据不同登录账号显示不同地图(所有2.5D地图)

彭宇 2 年之前
父節點
當前提交
3ab86236db
共有 5 個文件被更改,包括 528 次插入79 次删除
  1. 404 60
      src/components/supermap-2.5d.vue
  2. 30 3
      src/views/datacenter.vue
  3. 36 8
      src/views/forest.vue
  4. 24 0
      src/views/leader.vue
  5. 34 8
      src/views/monitor.vue

+ 404 - 60
src/components/supermap-2.5d.vue

@@ -1,18 +1,20 @@
 <template>
-  <div id="cesiumContainer" style="width: 100%; height: 100%;background: none;">
-    <!--地图top 显示 开始-->
-    <transition name='fade'>
-      <div class="map-tit" v-show="mapshow">
-        <div class="top-tit">
-          <i class="iconfont sj-icon-jkzx"></i>
-          <span><img src="../assets/images/close.svg" @click="mapshow=false" /></span>
+  <div id="supermap3D" style="width: 100%; height: 100%;background: none;overflow-y: auto;">
+    <div id="cesiumContainer" style="width: 100%; height: 100%;background: none;">
+      <!--地图top 显示 开始-->
+      <transition name='fade'>
+        <div class="map-tit" v-show="mapshow">
+          <div class="top-tit">
+            <i class="iconfont sj-icon-jkzx"></i>
+            <span><img src="../assets/images/close.svg" @click="mapshow=false" /></span>
+          </div>
+          <div class="map-txt" v-html="bindPopupHtml">
+          </div>
+          <div id="super2" />
         </div>
-        <div class="map-txt" v-html="bindPopupHtml">
-        </div>
-        <div id="super2" />
-      </div>
-    </transition>
-    <!--地图top 显示 结束-->
+      </transition>
+      <!--地图top 显示 结束-->
+    </div>
   </div>
 </template>
 
@@ -63,16 +65,159 @@
           mapData: null,
           mapName: null
         },
-        clickTime: new Date().getTime()
+        clickTime: new Date().getTime(),
+        cacheData: {
+          ProvinceRoad: "",
+          CountyRoad: "",
+          StateRoad: "",
+          ShuiXi: "",
+          XianJie: "",
+          XiangZhenJie: "",
+          Cun: "",
+        },
+        supermapUrls: [
+          [
+            "/3D-sipingchangjing/rest/realspace/datas/siping_2m@spyx4326",//底图
+            "/3D-local3DCache-0608XinBanQingXieShiJing/rest/realspace",//3D模型(二级图层)
+            "/map-mvt-shuixiMian/restjsr/v1/vectortile/maps/shuixi_Mian",//水系图
+            "/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi",//林地图
+            "/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian",//农田图
+            "/map-mvt-roadXian/restjsr/v1/vectortile/maps/road_Xian",//路网图
+            "/3D-road_Name_S/rest/realspace",//路网名称
+            "ProvinceRoad_L@SiPing#1",//名称图层叠加
+            "CountyRoad_L@SiPing#1",//名称图层叠加
+            "StateRoad_L@SiPing#1",//名称图层叠加
+            "/3D-shuixi_Name/rest/realspace",//水系名称
+            "ShuiXi@SiPing#1",//水系名称叠加
+            "/map-SIPING/rest/maps/XianJie_XiangZhenJie",//乡镇街界限
+            "/3D-Name_he/rest/realspace",//乡镇街名称
+            "XianJie@SiPing#1",//县界名称
+            "XiangZhenJie@SiPing#2",//乡镇街名称
+            "Cun@SiPing#1",//村名称
+          ],
+          [
+            "/3D-shuangliaoYX/rest/realspace/datas/siping_2m_shuangliao@spyx4326",
+            "/3D-shuangliaoYX/rest/realspace/datas/shuangliao@spyx4326",
+            "/map-mvt-shuiximianshuangliao/restjsr/v1/vectortile/maps/shuixi_mian_shuangliao",
+            "/map-mvt-lindishuangliao/restjsr/v1/vectortile/maps/lindi_shuangliao",
+            "/map-mvt-nongtianshuangliao/restjsr/v1/vectortile/maps/nongtian_shuangliao",
+            "/map-mvt-roadxianshuangliao/restjsr/v1/vectortile/maps/road_xian_shuangliao",
+            "/3D-road_Name_S_shuangliao/rest/realspace",
+            "ProvinceRoad_L_shuangliao@Road#1",
+            "CountyRoad_L_shuangliao@Road#1",
+            "StateRoad_L_shuangliao@Road#1",
+            "/3D-shuixi_Name_shuangliao/rest/realspace",
+            "ShuiXi_shuangliao@Road#1",
+            "/map-SIPING/rest/maps/xiangzhenjie_shuangliao",
+            "/3D-Name_he_shuangliao/rest/realspace",
+            "shuangliaoshi@gengdi#1",
+            "XiangZhenJie_shuangliao@gengdi#1",
+            "Cun_shuangliao@SiPing#1",
+          ],
+          [
+            "/3D-lishuYX/rest/realspace/datas/siping_2m_lishu@spyx4326",
+            "/3D-lishuYX/rest/realspace/datas/lishu_1@spyx4326",
+            "/map-mvt-shuiximianlishu/restjsr/v1/vectortile/maps/shuixi_mian_lishu",
+            "/map-mvt-lindilishu/restjsr/v1/vectortile/maps/lindi_lishu",
+            "/map-mvt-nongtianlishu/restjsr/v1/vectortile/maps/nongtian_lishu",
+            "/map-mvt-roadxianlishu/restjsr/v1/vectortile/maps/road_xian_lishu",
+            "/3D-road_Name_S_lishu/rest/realspace",
+            "ProvinceRoad_L_lishu@Road#1",
+            "CountyRoad_L_lishu@Road#1",
+            "StateRoad_L_lishu@Road#1",
+            "/3D-shuixi_Name_lishu/rest/realspace",
+            "ShuiXi_lishu@Road#1",
+            "/map-SIPING/rest/maps/xiangzhenjie_lishu",
+            "/3D-Name_he_lishu/rest/realspace",
+            "lishushi@gengdi#1",
+            "XiangZhenJie_lishu@gengdi#1",
+            "Cun_lishu@SiPing#1",
+          ],
+          [
+            "/3D-tiexiYX/rest/realspace/datas/siping_2m_tiexi@spyx4326",
+            "/3D-local3DCache-0608XinBanQingXieShiJing/rest/realspace",
+            "/map-mvt-shuiximiantiexi/restjsr/v1/vectortile/maps/shuixi_mian_tiexi",
+            "/map-mvt-linditiexi/restjsr/v1/vectortile/maps/lindi_tiexi",
+            "/map-mvt-nongtiantiexi/restjsr/v1/vectortile/maps/nongtian_tiexi",
+            "/map-mvt-roadxiantiexi/restjsr/v1/vectortile/maps/road_xian_tiexi",
+            "/3D-road_Name_S_tiexi/rest/realspace",
+            "ProvinceRoad_L_tiexi@Road#1",
+            "CountyRoad_L_tiexi@Road#1",
+            "StateRoad_L_tiexi@Road#1",
+            "/3D-shuixi_Name_tiexi/rest/realspace",
+            "ShuiXi_tiexi@Road#1",
+            "/map-SIPING/rest/maps/xiangzhenjie_tiexi",
+            "/3D-Name_he_tiexi/rest/realspace",
+            "tiexishi@gengdi#1",
+            "XiangZhenJie_tiexi@gengdi#1",
+            "Cun_tiexi@SiPing#1",
+          ],
+          [
+            "/3D-tiedongYX/rest/realspace/datas/siping_2m_tiedong@spyx4326",
+            "/3D-tiedongYX/rest/realspace/datas/tiedong@spyx4326",
+            "/map-mvt-shuiximiantiedong/restjsr/v1/vectortile/maps/shuixi_mian_tiedong",
+            "/map-mvt-linditiedong/restjsr/v1/vectortile/maps/lindi_tiedong",
+            "/map-mvt-nongtiantiedong/restjsr/v1/vectortile/maps/nongtian_tiedong",
+            "/map-mvt-roadxiantiedong/restjsr/v1/vectortile/maps/road_xian_tiedong",
+            "/3D-road_Name_S_tiedong/rest/realspace",
+            "ProvinceRoad_L_tiedong@Road#1",
+            "CountyRoad_L_tiedong@Road#1",
+            "StateRoad_L_tiedong@Road#1",
+            "/3D-shuixi_Name_tiedong/rest/realspace",
+            "ShuiXi_tiedong@Road#1",
+            "/map-SIPING/rest/maps/xiangzhenjie_tiedong",
+            "/3D-Name_he_tiedong/rest/realspace",
+            "tiedongshi@gengdi#1",
+            "XiangZhenJie_tiedong@gengdi#1",
+            "Cun_tiedong@SiPing#1",
+          ],
+          [
+            "/3D-yitongYX/rest/realspace/datas/siping_2m_yitong@spyx4326",
+            "/3D-yitongYX/rest/realspace/datas/yitong@spyx4326",
+            "/map-mvt-shuiximianyitong/restjsr/v1/vectortile/maps/shuixi_mian_yitong",
+            "/map-mvt-lindiyitong/restjsr/v1/vectortile/maps/lindi_yitong",
+            "/map-mvt-nongtianyitong/restjsr/v1/vectortile/maps/nongtian_yitong",
+            "/map-mvt-roadxianyitong/restjsr/v1/vectortile/maps/road_xian_yitong",
+            "/3D-road_Name_S_yitong/rest/realspace",
+            "ProvinceRoad_L_yitong@Road#1",
+            "CountyRoad_L_yitong@Road#1",
+            "StateRoad_L_yitong@Road#1",
+            "/3D-shuixi_Name_yitong/rest/realspace",
+            "ShuiXi_yitong@Road#1",
+            "/map-SIPING/rest/maps/xiangzhenjie_yitong",
+            "/3D-Name_he_yitong/rest/realspace",
+            "yitongshi@gengdi#1",
+            "XiangZhenJie_yitong@gengdi#1",
+            "Cun_yitong@SiPing#1",
+          ],
+        ],
       }
     },
     watch: {},
     created() {
-      this.superMapInfo();
     },
     mounted() {},
     props: {},
     methods: {
+      //初始化地图数据
+      removeAllviewer(num, index) {
+        if (index != -1) {
+          $('#cesiumContainer').remove();
+          $('#supermap3D').append("<div id=\"cesiumContainer\" style=\"width: 100%; height: 100%;background: none;\" >\n" +
+            "  </div>")
+        }
+        let that = this;
+        // that.removeAllMvt();
+        // that.viewer.imageryLayers.remove(this.layer);
+        // that.road_name.then(function (layers) {
+        //   that.viewer.scene.layers.find(that.cacheData.XianJie).visible = false;//文字图层
+        //   that.viewer.scene.layers.find(that.cacheData.XiangZhenJie).visible = false;//文字图层
+        //   that.viewer.scene.layers.find(that.cacheData.Cun).visible = false;//文字图层
+        // });
+        // that.layer_xianjie.show=false;
+
+        that.superMapInfo(num);
+      },
       choseMeasuringAreaAll() {
         if (this.handlerDis != null) {
           this.handlerDis.clear()
@@ -255,14 +400,15 @@
           this.graphicsBoxEntity = null
         }
       },
-      superMapInfo() {
+      superMapInfo(index) {
         getConfigKey('superMap.iServer').then(response => {
           this.superMapRootUrl = response.msg;
-          this.onload();
+          this.onload(index);
         })
       },
-      onload() {
+      onload(index) {
         let that = this;
+        const withinData = this.supermapUrls[index];
         //1.添加地形数据
         that.viewer = new Cesium.Viewer('cesiumContainer', {
           //创建地形服务提供者的实例,url为SuperMap iServer发布的TIN地形服务
@@ -285,46 +431,241 @@
 
         //2.添加SuperMap iServer发布的影像服务
         let layer = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
-          url: that.superMapRootUrl + "/3D-sipingchangjing/rest/realspace/datas/siping_2m@spyx4326",
+          url: that.superMapRootUrl + withinData[0],
         }));
 
-        //飞行值坐标点,每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)
-            }
-          });
+        if (index == 0) {  //全部
+          //飞行值坐标点,每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)
+              }
+            });
 
-        }, 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)
-            }
-          });
+          }, 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)
+              }
+            });
 
-        }, 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)
-            }
-          });
+          }, 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)
+              }
+            });
 
-        }, 3000);
+          }, 3000);
+        } else if (index == 1) {  //双辽
+          //飞行值坐标点,每3秒推进一级
+          //heading-代表镜头左右方向,正值为右,负值为左
+          //pitch-代表镜头上下方向,正值为上,负值为下.
+          //roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(123.77896424451833, 43.70521317451045, 950000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(123.77896424451833, 43.70521317451045, 650000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(123.77896424451833, 43.70521317451045, 200000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+        } else if (index == 2) {  //梨树
+          //飞行值坐标点,每3秒推进一级
+          //heading-代表镜头左右方向,正值为右,负值为左
+          //pitch-代表镜头上下方向,正值为上,负值为下.
+          //roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.28276991763133, 43.46361757293432, 950000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.28276991763133, 43.46361757293432, 650000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.28276991763133, 43.46361757293432, 200000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+        } else if (index == 3) {  //铁西
+          //飞行值坐标点,每3秒推进一级
+          //heading-代表镜头左右方向,正值为右,负值为左
+          //pitch-代表镜头上下方向,正值为上,负值为下.
+          //roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.35516104252032, 43.220384847557234, 1050000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.35516104252032, 43.220384847557234, 550000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.35516104252032, 43.220384847557234, 50000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+
+        } else if (index == 4) {  //铁东
+          //飞行值坐标点,每3秒推进一级
+          //heading-代表镜头左右方向,正值为右,负值为左
+          //pitch-代表镜头上下方向,正值为上,负值为下.
+          //roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.54435750508439, 43.04539078139383, 950000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.54435750508439, 43.04539078139383, 650000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(124.54435750508439, 43.04539078139383, 100000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+
+        } else if (index == 5) {  //伊通
+          //飞行值坐标点,每3秒推进一级
+          //heading-代表镜头左右方向,正值为右,负值为左
+          //pitch-代表镜头上下方向,正值为上,负值为下.
+          //roll-代表镜头左右倾斜,正值,向右倾斜,负值向左倾斜
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(125.34420717245336, 43.35653920782364, 950000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(125.34420717245336, 43.35653920782364, 650000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+          setTimeout(function () {
+            that.viewer.camera.flyTo({
+              destination: Cesium.Cartesian3.fromDegrees(125.34420717245336, 43.35653920782364, 150000),
+              orientation: {
+                // heading :  Cesium.Math.toRadians(346.4202942851978),
+                // pitch : Cesium.Math.toRadians(-56.74026687972041),
+                // roll : Cesium.Math.toRadians(0)
+              }
+            });
+
+          }, 3000);
+
+        }
 
         //开始加载专题图等数据,8秒后开始执行
         setTimeout(function() {
@@ -381,16 +722,19 @@
 
           //9.添加县界和乡镇界
           let layer_xianjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
-            url: that.superMapRootUrl + "/map-SIPING/rest/maps/XianJie_XiangZhenJie",
+            url: that.superMapRootUrl + withinData[12],
           }));
 
           //10.添加区县乡镇村名称
-          let layer_xiangzhenjie_name = that.superMapRootUrl + '/3D-Name_he/rest/realspace';
+          let layer_xiangzhenjie_name = that.superMapRootUrl + withinData[13];
           that.scene.open(layer_xiangzhenjie_name);
-          that.road_name.then(function(layers) {
-            let xianJie_textLayer = that.scene.layers.find('XianJie@SiPing#1'); //区县文字图层
-            let xiangZhenJie_textLayer = that.scene.layers.find('XiangZhenJie@SiPing#2'); //乡镇文字图层
-            let cun_textLayer = that.scene.layers.find('Cun@SiPing#1'); //村文字图层
+          that.cacheData.XianJie = withinData[14]
+          that.cacheData.XiangZhenJie = withinData[15]
+          that.cacheData.Cun = withinData[16]
+          that.road_name.then(function (layers) {
+            let xianJie_textLayer = that.scene.layers.find(withinData[14]);//区县文字图层
+            let xiangZhenJie_textLayer = that.scene.layers.find(withinData[15]);//乡镇文字图层
+            let cun_textLayer = that.scene.layers.find(withinData[16]);//村文字图层
             //关闭避让
             xianJie_textLayer.isOverlapDisplayed = true;
             xiangZhenJie_textLayer.isOverlapDisplayed = true;
@@ -600,4 +944,4 @@
     opacity: 0;
     transform: translateY(-10rem);
   }
-</style>
+</style>

+ 30 - 3
src/views/datacenter.vue

@@ -118,7 +118,8 @@ import vheader from "@/components/v-header.vue"; //一体化共用头部
 import vBottomMenu from "@/components/vBottomMenu.vue"; //一体化公共底部菜单
 import eventLocation from "@/components/eventLocation.vue"; //事件定位弹窗
 import TVWall from "@/components/TVWall.vue"; //电视墙弹窗
-import { getIconBg } from "@/api/components/sookaMapIcon"; //资源底色控制文件
+import { getIconBg } from "@/api/components/sookaMapIcon";
+import {getUserProfile} from "@/api/system/user"; //资源底色控制文件
 
 // import echarts from 'echarts'
 let echarts = require("echarts");
@@ -138,8 +139,13 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
-    // this.getResource()
-    this.fireControlViewList();
+    // 初始化地图数据
+    this.getSuperMapUrl();
+
+    setTimeout(() => {
+      // this.getResource()
+      this.fireControlViewList();
+    }, 2000)
     this.bottomMenuList(); //获取底部公共组件消息和任务
   },
   data() {
@@ -175,6 +181,27 @@ export default {
     // },
   },
   methods: {
+    //初始化地图数据
+    getSuperMapUrl(){
+      getUserProfile().then(response => {
+        let mapDeptId=response.mapDeptId
+        let num = 0;
+        if (mapDeptId == "365") {
+          num = 0;
+        } else if (mapDeptId == "369") {
+          num = 1;
+        } else if (mapDeptId == "371") {
+          num = 2;
+        } else if (mapDeptId == "373") {
+          num = 3;
+        } else if (mapDeptId == "372") {
+          num = 4;
+        } else if (mapDeptId == "370") {
+          num = 5;
+        }
+        this.$refs.supermap.removeAllviewer(num, -1);
+      });
+    },
     // 根据名称筛选资源点位
     searchByName() {
       this.$modal.msgSuccess("正在查询,请稍后...");

+ 36 - 8
src/views/forest.vue

@@ -448,6 +448,7 @@ import firespread from '@/views/firespread.vue' //事件详情弹窗
 import Firespread from "./firespread";
 import chart from "./from/dvCapsuleChart.vue";
 import {selectConfigKey} from "@/api/system/config";
+import {getUserProfile} from "@/api/system/user";
 
 let echarts = require('echarts')
 export default {
@@ -474,15 +475,21 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
+    // 初始化地图数据
+    this.getSuperMapUrl();
+
+    setTimeout(() => {
+      this.getTodayEvents(this.getCurrentDataStr())
+      this.getDeptEventCount(this.getCurrentDataStr())
+      this.getWeather(this.getCurrentDataStr())
+      this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum)
+      this.getEventByEventType(this.getCurrentDataStr())
+      this.getEventByReportorOrder(this.getCurrentDataStr())
+      this.getExposureStage(this.getCurrentDataStr())
+      this.getSupermap(this.getCurrentDataStr())
+    }, 2000)
     this.getBaseInfo()
-    this.getTodayEvents(this.getCurrentDataStr())
-    this.getDeptEventCount(this.getCurrentDataStr())
-    this.getWeather(this.getCurrentDataStr())
-    this.getEventList(this.getCurrentDataStr(), this.pageSize, this.pageNum)
-    this.getEventByEventType(this.getCurrentDataStr())
-    this.getEventByReportorOrder(this.getCurrentDataStr())
-    this.getExposureStage(this.getCurrentDataStr())
-    this.getSupermap(this.getCurrentDataStr())
+
     this.getMenuEventType()
     /** ----------------------------------weosocket开始------------------------------------- */
     // this.initWebSocket()
@@ -573,6 +580,27 @@ export default {
   },
   /** ----------------------------------weosocket结束------------------------------------- */
   methods: {
+    //初始化地图数据
+    getSuperMapUrl(){
+      getUserProfile().then(response => {
+        let mapDeptId=response.mapDeptId
+        let num = 0;
+        if (mapDeptId == "365") {
+          num = 0;
+        } else if (mapDeptId == "369") {
+          num = 1;
+        } else if (mapDeptId == "371") {
+          num = 2;
+        } else if (mapDeptId == "373") {
+          num = 3;
+        } else if (mapDeptId == "372") {
+          num = 4;
+        } else if (mapDeptId == "370") {
+          num = 5;
+        }
+        this.$refs.supermap.removeAllviewer(num, -1);
+      });
+    },
     getMenuEventType() {
       let that = this
       getMenuEventType().then(res => {

+ 24 - 0
src/views/leader.vue

@@ -206,6 +206,7 @@ import vheader from "@/components/v-header.vue"; //一体化共用头部
 import vBottomMenu from "@/components/vBottomMenu.vue"; //一体化公共底部菜单
 import eventLocation from "@/components/eventLocation.vue"; //事件定位弹窗
 import TVWall from "@/components/TVWall.vue"; //电视墙弹窗
+import {getUserProfile} from "@/api/system/user";
 
 let echarts = require("echarts");
 export default {
@@ -251,6 +252,8 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
+    // 初始化地图数据
+    this.getSuperMapUrl();
     this.bottomMenuList(); //获取底部公共组件消息和任务
   },
   watch: {
@@ -266,6 +269,27 @@ export default {
     },
   },
   methods: {
+    //初始化地图数据
+    getSuperMapUrl(){
+      getUserProfile().then(response => {
+        let mapDeptId=response.mapDeptId
+        let num = 0;
+        if (mapDeptId == "365") {
+          num = 0;
+        } else if (mapDeptId == "369") {
+          num = 1;
+        } else if (mapDeptId == "371") {
+          num = 2;
+        } else if (mapDeptId == "373") {
+          num = 3;
+        } else if (mapDeptId == "372") {
+          num = 4;
+        } else if (mapDeptId == "370") {
+          num = 5;
+        }
+        this.$refs.supermap.removeAllviewer(num, -1);
+      });
+    },
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
     bottomMenuList() {
       this.$refs.bottomMenu.selectTaskList(); //获取任务列表

+ 34 - 8
src/views/monitor.vue

@@ -239,6 +239,7 @@ import DHWs from "@/dahua/lib/DHWs";
 // import echarts from 'echarts'
 let echarts = require("echarts");
 import Cookies from "js-cookie";
+import {getUserProfile} from "@/api/system/user";
 
 export default {
   components: {
@@ -262,14 +263,18 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
-    this.selectKeyAreaList();
-    this.bottomMenuList(); //获取底部公共组件消息和任务
-    this.getTreeselect();
-    this.deptId = Cookies.get("deptId");
-    this.getMonitorDeviceAndDataLists();
-    // this.getDlblistBydeptIds();
-    this.selectDeviceType(-1);
-    // this.showTVWall();
+    // 初始化地图数据
+    this.getSuperMapUrl();
+
+    setTimeout(() => {
+      this.selectKeyAreaList();
+      this.bottomMenuList(); //获取底部公共组件消息和任务
+      this.getTreeselect();
+      this.deptId = Cookies.get("deptId");
+      this.getMonitorDeviceAndDataLists();
+      // this.getDlblistBydeptIds();
+      this.selectDeviceType(-1);
+    }, 2000)
   },
   beforeDestroy() {
     clearInterval(this.cgqTimer); //关闭
@@ -358,6 +363,27 @@ export default {
     },
   },
   methods: {
+    //初始化地图数据
+    getSuperMapUrl(){
+      getUserProfile().then(response => {
+        let mapDeptId=response.mapDeptId
+        let num = 0;
+        if (mapDeptId == "365") {
+          num = 0;
+        } else if (mapDeptId == "369") {
+          num = 1;
+        } else if (mapDeptId == "371") {
+          num = 2;
+        } else if (mapDeptId == "373") {
+          num = 3;
+        } else if (mapDeptId == "372") {
+          num = 4;
+        } else if (mapDeptId == "370") {
+          num = 5;
+        }
+        this.$refs.supermap.removeAllviewer(num, -1);
+      });
+    },
     // setcgqValue: function() {
     //   let that = this
     //   for (let i = 0; i < that.visuForestCloudCameraBOListSearch.length; i++) {