shuishen
2022-03-17 ae2fc3a474e43a7e3ff60f427061bfe27b51abb7
Merge branch 'master' of http://192.168.0.105:10010/r/school-web
4 files modified
131 ■■■■ changed files
src/components/mobileCortrol/index.vue 20 ●●●● patch | view | raw | blame | history
src/components/mobilePopupOurAfter/index.vue 4 ●●●● patch | view | raw | blame | history
src/components/mobilemap/index.vue 24 ●●●● patch | view | raw | blame | history
src/store/modules/mobile.js 83 ●●●● patch | view | raw | blame | history
src/components/mobileCortrol/index.vue
@@ -1,15 +1,12 @@
<template>
  <div class="m-left-control">
    <!-- <div class="m-l-inbut zoom-in" @click="zoomIn()">
            <i class="el-icon-refresh"></i>
        </div> -->
    <!-- <div
    <div
      class="m-l-inbut zoom-in m-l-inbut-2d"
      :class="{ active: dimension == '3D' }"
      @click="zoomIn('3D')"
    >
      3&nbsp;&nbsp;维
        </div>-->
    </div>
    <div
      class="m-l-inbut zoom-in m-l-inbut-3d"
      :class="{ active: dimension == '2.5D' }"
@@ -28,28 +25,17 @@
    return {};
  },
  computed: {
    ...mapGetters(["startPointFn", "dimension"]),
    ...mapGetters(["dimension"]),
  },
  created() {},
  methods: {
    zoomIn(val) {
      // this.$store.dispatch("mapFlyTo", {
      //   //飞入
      //   lntLat: [115.87988885, 28.72502592, 2100],
      //   // lntLat: [115.87186406, 28.74449337, 1200],
      //   // lntLat: [121.50492752204283, 31.21567802276832, 2530],
      //   heading: 0,
      //   pitch: -45,
      //   roll: 0,
      //   noOpen: true,
      // });
      if (val) {
        if (this.dimension != val) {
          this.$store.dispatch("MSET_DIMENSIONS", val);
        }
        return;
      }
      this.startPointFn();
    },
  },
};
src/components/mobilePopupOurAfter/index.vue
@@ -286,6 +286,7 @@
  justify-content: center;
}
.mobilePopupOurAfter {
  font-size: 18px;
  position: fixed;
  top: 37.5%;
  // left: 13.5%;
@@ -372,4 +373,7 @@
.ismBigPopupAfter {
  left: 13.5%;
}
.m_p_a_c_o_down {
  font-size: 14px;
}
</style>
src/components/mobilemap/index.vue
@@ -614,9 +614,9 @@
        global.viewer.scene.globe.depthTestAgainstTerrain = false;
        // console.log(e);
        global.viewer.flyToPosition(
          new global.DC.Position(115.87186406, 28.74449337, 1800, 0, 45, 0)
        );
        // global.viewer.flyToPosition(
        //   new global.DC.Position(115.87186406, 28.74449337, 1800, 0, 45, 0)
        // );
        // 定制化窗体
        that.openPopupS(
@@ -626,9 +626,10 @@
            name: e.overlay.attr.name,
            address: e.layer._id,
            introduce: e.overlay.attr.id,
            data: e,
            // data: e,
          }
        );
        // return;
        // 高亮
        window.silhouetteBlue.selected = [];
@@ -944,13 +945,13 @@
      // 瀑布流↑
      // 传入store
      that.$store.commit("MSET_MODEOLS", {
        tilesetLayer: window.tilesetLayer,
        // tileset: window.tileset,
        newLayer: window.newLayer,
        wallLayer: window.wallLayer,
        usetowpointfive: window.usetowpointfive,
      });
      // that.$store.commit("MSET_MODEOLS", {
      //   tilesetLayer: window.tilesetLayer,
      //   // tileset: window.tileset,
      //   newLayer: window.newLayer,
      //   wallLayer: window.wallLayer,
      //   usetowpointfive: window.usetowpointfive,
      // });
      // 飞入起始点
      // that.$store.dispatch("mapFlyTo", {
@@ -1094,6 +1095,7 @@
        query: { introduce: position, address: lntLat, ...(query || {}) },
        useJWD: true, // 仅使用经纬度
      };
      console.log(d);
      that.$store.dispatch("setMobileWindows", d);
    },
    flytos(jd, wd) {
src/store/modules/mobile.js
@@ -19,8 +19,8 @@
window.drawAPointLayerMany = null; //活动点
window.drawAPointLayerManyposition = null; //活动点位置
window.drawAPointLayerManyLabels = null; //活动点
window.tilesetLayer = null;
window.wallLayer = null;
// window.tilesetLayer = null;
// window.wallLayer = null;
window.areaLayer = null;
window.tileset = null;
window.drawALineLayer = null; // 导航路径图层
@@ -39,8 +39,10 @@
    color: undefined
};
window.newLayer = null;
window.usetowpointfive = null;
window.tancuanPosition = null;
// window.newLayer = null;
// window.usetowpointfive = null;
window.startPointFn = null;
const mobile = {
@@ -207,30 +209,32 @@
                    roll: 0
                }
                // 加载底图
                window.vecLayer = global.viewer.imageryLayers.addImageryProvider(
                    new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
                        url: ' http://t1.tianditu.gov.cn/vec_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
                        type: 'wmts',
                        layer: 'vec',
                        style: 'default',
                        format: 'tiles',
                        tileMatrixSetID: 'w',
                        show: true,
                        maximumLevel: 18
                    })
                )
                window.cvaLayer = global.viewer.imageryLayers.addImageryProvider(
                    new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
                        url: ' http://t1.tianditu.gov.cn/cva_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
                        type: 'wmts',
                        layer: 'cva',
                        style: 'default',
                        format: 'tiles',
                        tileMatrixSetID: 'w',
                        show: true,
                        maximumLevel: 18
                    })
                )
                if (!window.vecLayer) {
                    window.vecLayer = global.viewer.imageryLayers.addImageryProvider(
                        new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
                            url: ' http://t1.tianditu.gov.cn/vec_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
                            type: 'wmts',
                            layer: 'vec',
                            style: 'default',
                            format: 'tiles',
                            tileMatrixSetID: 'w',
                            show: true,
                            maximumLevel: 18
                        })
                    )
                    window.cvaLayer = global.viewer.imageryLayers.addImageryProvider(
                        new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
                            url: ' http://t1.tianditu.gov.cn/cva_w/wmts?tk=9ae78c51a0a28f06444d541148496e36',
                            type: 'wmts',
                            layer: 'cva',
                            style: 'default',
                            format: 'tiles',
                            tileMatrixSetID: 'w',
                            show: true,
                            maximumLevel: 18
                        })
                    )
                }
                // console.log(1321)
                window.wallLayer.show = false // 关闭瀑布   以及2.5d图形贴片
                global.viewer.imageryLayers.remove(window.newLayer)
@@ -242,7 +246,6 @@
                window.startPointFn() // 移动默认视角
                // global.viewer.flyTo(window.tileset);
                window.areaLayer.show = false // 绿布
                // 3D视角不限制
                global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 80
                // 最大
@@ -323,13 +326,13 @@
            state.perspectiveControl = data
            state.perspectiveControls = !state.perspectiveControls
        },
        MSET_MODEOLS(state, data) {
            window.tilesetLayer = data.tilesetLayer
            window.newLayer = data.newLayer
            window.wallLayer = data.wallLayer
            window.tileset = data.tileset
            window.usetowpointfive = data.usetowpointfive
        },
        // MSET_MODEOLS(state, data) {
        //     window.tilesetLayer = data.tilesetLayer
        //     window.newLayer = data.newLayer
        //     window.wallLayer = data.wallLayer
        //     window.tileset = data.tileset
        //     window.usetowpointfive = data.usetowpointfive
        // },
        // 直接移动
        cameraSetView(state, data) {
            global.viewer.camera.setView({
@@ -384,7 +387,7 @@
        },
        // 显影线路或者点
        showLineOrPoint(state, val) {
            state[val.layer].show = val.flag
            window[val.layer].show = val.flag
        },
        // 传送终点数据
        set_endPosition(state, data) {
@@ -469,7 +472,7 @@
                    data.from == 'PopupOurOnce' ? 0 : 0
                ]
            }
            window.tancuanPosition = data.position;
            if (data.useJWD) {
                window.ellipsoid = global.viewer.scene.globe.ellipsoid
                window.cartographic = global.DC.Namespace.Cesium.Cartographic.fromDegrees(
@@ -479,7 +482,7 @@
                    // clnt, clat, calt
                    ...clas
                )
                data.position = window.ellipsoid.cartographicToCartesian(window.cartographic)
                window.tancuanPosition = window.ellipsoid.cartographicToCartesian(window.cartographic)
            }
            // 定制化窗体
@@ -488,7 +491,7 @@
                title: data.query.name || '成教楼  ',
                className: 'mobilePopup',
                content: document.getElementById('mobile-map_content_content'),
                position: [data.position]
                position: [window.tancuanPosition]
            })
            // commit("MSET_MOBILEWINDOWSHIDE", false)//显示弹窗
            // dispatch("CHANGETOC3", { // 转换坐标