ソースを参照

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

彭宇 2 年 前
コミット
d29e2c8d53

+ 409 - 65
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" /></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" /></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>
 
@@ -66,12 +68,136 @@
           mapName: null
         },
         showLayer: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() {
       this.showLayer = this.showLayer != undefined ? this.showLayer:false;
@@ -80,6 +206,25 @@
       showLayer: [Boolean],
     },
     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()
@@ -202,14 +347,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地形服务
@@ -232,46 +378,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() {
@@ -299,7 +640,7 @@
           //
           //5.农田
           if(that.showLayer){
-            let nongtian = that.superMapRootUrl + "/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian";
+            let nongtian = that.superMapRootUrl + withinData[4];
             that.mvtMap2 = that.scene.addVectorTilesMap({
               url: nongtian,
               canvasWidth: 512,
@@ -330,21 +671,24 @@
 
           //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'); //村文字图层
-          //   //关闭避让
-          //   xianJie_textLayer.isOverlapDisplayed = true;
-          //   xiangZhenJie_textLayer.isOverlapDisplayed = true;
-          //   cun_textLayer.isOverlapDisplayed = true;
-          // });
+          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;
+            cun_textLayer.isOverlapDisplayed = true;
+          });
 
         }, 3000);
         that.viewer.selectedEntityChanged.addEventListener(function (entity) {

+ 26 - 1
src/views/datacenter.vue

@@ -131,7 +131,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");
 export default {
@@ -150,6 +151,9 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
+    // 初始化地图数据
+    this.getSuperMapUrl();
+
     this.getResource();
     this.bottomMenuList(); //获取底部公共组件消息和任务
   },
@@ -186,6 +190,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("正在查询,请稍后...");

+ 25 - 1
src/views/forest.vue

@@ -478,6 +478,7 @@
   import {
     selectConfigKey
   } from "@/api/system/config";
+  import {getUserProfile} from "@/api/system/user";
 
   let echarts = require('echarts')
   export default {
@@ -505,6 +506,9 @@
     },
 
     mounted() {
+      // 初始化地图数据
+      this.getSuperMapUrl();
+
       this.getBaseInfo()
       this.getTodayEvents(this.getCurrentDataStr())
       this.getDeptEventCount(this.getCurrentDataStr())
@@ -527,7 +531,6 @@
         //左侧资源
         resourcesList: [],
         iconCurrentIndex:"",
-        markersList: [],
         source: [],
         //警报MP3文件
         audioSrc: require('@/assets/jingbao.mp3'),
@@ -612,6 +615,27 @@
     },
     /** ----------------------------------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);
+        });
+      },
       getResource() {
         let that = this
         //获取左侧菜单列表

+ 26 - 1
src/views/leader.vue

@@ -211,7 +211,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 { getRyList, getRyListByJob } from "@/api/forest"; //电视墙弹窗
+import { getRyList, getRyListByJob } from "@/api/forest";
+import {getUserProfile} from "@/api/system/user"; //电视墙弹窗
 
 let echarts = require("echarts");
 export default {
@@ -256,6 +257,9 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
+    // 初始化地图数据
+    this.getSuperMapUrl();
+
     this.bottomMenuList(); //获取底部公共组件消息和任务
   },
   watch: {
@@ -269,6 +273,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(); //获取任务列表

+ 25 - 0
src/views/monitor.vue

@@ -172,6 +172,7 @@
   // import echarts from 'echarts'
   let echarts = require('echarts')
   import Cookies from 'js-cookie';
+  import {getUserProfile} from "@/api/system/user";
 
   export default {
     components: {
@@ -195,6 +196,9 @@
       /** ----------------------------------底部按钮公用组件结束------------------------------------- */
     },
     mounted() {
+      // 初始化地图数据
+      this.getSuperMapUrl();
+
       this.selectKeyAreaList()
       this.bottomMenuList() //获取底部公共组件消息和任务
       this.getTreeselect()
@@ -285,6 +289,27 @@
       }
     },
     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);
+        });
+      },
       jump() { // 跳转云广播页面
         window.open("https://sts.sty1818.com");
       },

+ 25 - 0
src/views/tianzhangzhi.vue

@@ -178,6 +178,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 {
@@ -211,6 +212,9 @@ export default {
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
+    // 初始化地图数据
+    this.getSuperMapUrl();
+
     this.bottomMenuList(); //获取底部公共组件消息和任务
   },
   watch: {
@@ -224,6 +228,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);
+      });
+    },
     selectGridLandInfo(data) {
       // alert(data.gridFarmId) //undefined
       // alert(data.gridLandId) //undefined