shuishen
2021-12-23 9e43f80d96bda7f1108dcfcfd7340e567f2e48d0
Merge branch 'master' of http://192.168.0.105:10010/r/school-web
9 files modified
217 ■■■■■ changed files
src/components/mobileCortrol/index.vue 3 ●●●● patch | view | raw | blame | history
src/components/mobileCortrolButtom/index.vue 17 ●●●●● patch | view | raw | blame | history
src/components/mobileLeftNav/index.vue 3 ●●●● patch | view | raw | blame | history
src/components/mobilePopupOurOnce/index.vue 1 ●●●● patch | view | raw | blame | history
src/components/mobileWindow/index.vue 11 ●●●● patch | view | raw | blame | history
src/components/mobilemap/index.vue 138 ●●●●● patch | view | raw | blame | history
src/mobileDivForms/mobileDivForms.js 17 ●●●● patch | view | raw | blame | history
src/store/modules/mobile.js 5 ●●●●● patch | view | raw | blame | history
src/styles/mobile/popup.scss 22 ●●●●● patch | view | raw | blame | history
src/components/mobileCortrol/index.vue
@@ -25,7 +25,8 @@
    zoomIn(val) {
      this.$store.dispatch("mapFlyTo", {
        //飞入
        lntLat: [115.87186406, 28.74449337, 1200],
        lntLat: [115.87988885, 28.72502592, 2100],
        // lntLat: [115.87186406, 28.74449337, 1200],
        // lntLat: [121.50492752204283, 31.21567802276832, 2530],
        heading: 0,
        pitch: -45,
src/components/mobileCortrolButtom/index.vue
@@ -40,16 +40,16 @@
          lat: 28.74382592,
        },
        {
          lnt: 121.50266534548483,
          lat: 31.24357506330159,
          lnt: 115.86711312,
          lat: 28.74615701,
        },
        {
          lnt: 121.56405019,
          lat: 31.20845211,
          lnt: 115.86972136,
          lat: 28.74609846,
        },
        {
          lnt: 121.55500463461836,
          lat: 31.257934074839717,
          lnt: 115.86983129,
          lat: 28.741337,
        },
      ],
    };
@@ -71,9 +71,12 @@
      let that = this;
      console.log(command, "定位");
      // 定位
      this.$store.commit("MSETCC_SETCC", {
        lntLat: [command.lnt, command.lat],
      });
      this.$store.dispatch("mapFlyTo", {
        //飞入
        lntLat: [command.lnt, command.lat, 2530],
        lntLat: [command.lnt, command.lat, 500],
        heading: 0,
        pitch: -45,
        roll: 0,
src/components/mobileLeftNav/index.vue
@@ -207,7 +207,8 @@
      // console.log(posi);
      this.$store.dispatch("mapFlyTo", {
        //飞入
        lntLat: [posi.lng + 0.01187, posi.lat - 0.0308, 4000],
        lntLat: [posi.lng + 0.00917, posi.lat - 0.0188, 2100],
        // lntLat: [posi.lng + 0.01187, posi.lat - 0.0308, 4000],
        // lntLat: [121.50492752204283, 31.21567802276832, 2530],
        heading: 0,
        pitch: -45,
src/components/mobilePopupOurOnce/index.vue
@@ -94,6 +94,7 @@
        return;
      }
      let that = this;
      // console.log(that.ourData.lntLat);
      if (val == "定位") {
        //随地图移动窗口
        this.$store.commit("MSET_BIGPOPUP", false); //关闭全屏弹窗
src/components/mobileWindow/index.vue
@@ -29,7 +29,12 @@
            <div class="m-c-title">{{ item.name }}:</div>
            <span class="m-c-center">{{ item.value }}</span>
          </div>
          <div class="mobileBig-center-introduce" v-html="introduce"></div>
          <div
            class="mobileBig-center-introduce"
            style="padding-top: 10px"
            v-show="introduce"
            v-html="introduce"
          ></div>
        </div>
      </div>
      <div class="mobile-popup-control">
@@ -68,6 +73,7 @@
  },
  watch: {
    MobileWindowChangeData() {
      //数据更改
      //   this.fullscreenLoading = true;
      if (!this.MobileWindowsHide) {
        // console.log("地图点击弹窗数据请求参数", this.query);
@@ -138,8 +144,7 @@
        //   value: "详情",
        // },
      ],
      introduce:
        "1,是一个阿拉伯数字。1是一个自然数,是最小的正整数,是最小的正奇数。1是一个有理数,是一位数,也是奇数。1既不是质数也不是合数。1的n次方(n∈R)都等于1。1的倒数是它本身。一个或者几个事物所组成的整体,可以看作是单位“1”。",
      introduce: "暂无详情数据",
      title: "",
      fullscreenLoading: false,
      url: "/img/job/one.jpg",
src/components/mobilemap/index.vue
@@ -186,71 +186,107 @@
        if (!that.MobileWindowsHide) {
          // that.$store.dispatch("closeMobileWindowsDom"); //关闭随地图弹窗
        }
        // if (!that.MobileWindowsHideFixed) {
        //   that.$store.dispatch("CLOSE_WIDOWFIXED"); //关闭固定弹窗
        // }
        // if (!that.MobileWindowsHide && that.popupsDom) {
        //   that.popupsDom.closeOur();
        //   that.$store.commit("MSET_MOBILEWINDOWSHIDE", true);
        // }
        // nowPosition = [e.wgs84Position.lng, e.wgs84Position.lat];
        // console.log(nowPosition);
      });
      const layer = new DC.TilesetLayer("layer");
      viewer.addLayer(layer);
      const tileset = new DC.Tileset(
        "http://resource.dvgis.cn/data/3dtiles/ljz/tileset.json"
      );
      const style = new DC.TilesetStyle();
      style.color = {
        conditions: [
          ["${Height} >= 300", "rgba(45, 0, 75, 0.5)"],
          ["${Height} >= 200", "rgb(102, 71, 151)"],
          ["${Height} >= 100", "rgb(170, 162, 204)"],
          ["${Height} >= 50", "rgb(224, 226, 238)"],
          ["${Height} >= 25", "rgb(252, 230, 200)"],
          ["${Height} >= 10", "rgb(248, 176, 87)"],
          ["${Height} >= 5", "rgb(198, 106, 11)"],
          ["true", "rgb(127, 59, 8)"],
        ],
      };
      //自带白模型↓
      // const layer = new DC.TilesetLayer("layer");
      // viewer.addLayer(layer);
      // const tileset = new DC.Tileset(
      //   "http://resource.dvgis.cn/data/3dtiles/ljz/tileset.json"
      // );
      // const style = new DC.TilesetStyle();
      // style.color = {
      //   conditions: [
      //     ["${Height} >= 300", "rgba(45, 0, 75, 0.5)"],
      //     ["${Height} >= 200", "rgb(102, 71, 151)"],
      //     ["${Height} >= 100", "rgb(170, 162, 204)"],
      //     ["${Height} >= 50", "rgb(224, 226, 238)"],
      //     ["${Height} >= 25", "rgb(252, 230, 200)"],
      //     ["${Height} >= 10", "rgb(248, 176, 87)"],
      //     ["${Height} >= 5", "rgb(198, 106, 11)"],
      //     ["true", "rgb(127, 59, 8)"],
      //   ],
      // };
      viewer.use(new DC.Measure());
      // viewer.use(new DC.Measure());
      tileset.setStyle(style);
      // tileset.setStyle(style);
      // layer.addOverlay(tileset);
      // viewer.flyTo(tileset);
      that.$store.dispatch("mapFlyTo", {
        lntLat: [115.87186406, 28.74449337, 1200],
        heading: 0,
        pitch: -45,
        roll: 0,
        noOpen: true,
      //自带白模型↑
      //精细模型↓
      const tilesetLayer = new that.DC.TilesetLayer("tilesetLayer");
      viewer.addLayer(tilesetLayer);
      const tileset = new that.DC.Tileset(
        "http://data.mars3d.cn/3dtiles/max-shihua/tileset.json",
        {
          luminanceAtZenith: 0.5,
        }
      );
      tilesetLayer.addOverlay(tileset);
      viewer.flyTo(tileset);
      //精细模型↑
      //瀑布流↓
      const wallLayer = new that.DC.VectorLayer("wallLayer");
      viewer.addLayer(wallLayer);
      var arr = [
        [115.87597219, 28.74628526, 100],
        [115.87556558, 28.74415792, 100],
        [115.87459782, 28.74197687, 100],
        [115.87371834, 28.74219927, 100],
        [115.87210924, 28.74182217, 100],
        [115.86469971, 28.73630725, 100],
        [115.86387107, 28.73620123, 100],
        [115.86274498, 28.73616026, 100],
        [115.86173699, 28.7424135, 100],
        [115.86105468, 28.74643934, 100],
        [115.8660924, 28.74642593, 100],
        [115.87597219, 28.74628526, 100],
      ];
      arr.forEach((item) => {
        item = item.join(",");
      });
      arr = arr.join(";");
      const wall = new that.DC.Wall(arr);
      wall.setStyle({
        material: new that.DC.WallTrailMaterialProperty({
          color: that.DC.Color.DEEPSKYBLUE,
          speed: 4,
        }),
      });
      wallLayer.addOverlay(wall);
      viewer.use(new that.DC.Measure());
      //瀑布流↑
      //飞入起始点
      // that.$store.dispatch("mapFlyTo", {
      //   lntLat: [115.87186406, 28.74449337, 1200],
      //   heading: 0,
      //   pitch: -45,
      //   roll: 0,
      //   noOpen: true,
      // });
      //地图渲染完成执行srore中MSET_CREADE
      that.$store.dispatch("MSET_CREADE");
      // that.$store.dispatch("MSET_CREADE");
      tileset.on(DC.MouseEventType.CLICK, (e) => {
        // that.popupFlag = true
        // that.popupWindow = true;
        viewer.scene.globe.depthTestAgainstTerrain = false;
        // console.log(document.getElementById("mobile-map_content_content"));
        // console.log(e);
        // 定制化窗体
        that.openPopupS(e.position, [e.wgs84Position.lng, e.wgs84Position.lat]);
        // popup.setWrapper('<div></div>')
        // popup.showAt(e.position, document.getElementById('modelPopup'))
        that.openPopupS(
          e.position,
          [e.wgs84Position.lng, e.wgs84Position.lat],
          {
            name: e.layer._bid,
            address: e.layer.type,
            introduce: e.layer._id,
          }
        );
      });
      // viewer.zoomToPosition(
      //     new DC.Position(105.565571, 31.984708, 15362816, 0, -90)
      // )
      viewer.compass.enable = false;
      viewer.zoomController.enable = true;
@@ -267,7 +303,7 @@
      let d = {
        position,
        lntLat,
        query: { ...(query || {}), introduce: position, address: lntLat },
        query: { introduce: position, address: lntLat, ...(query || {}) },
        useJWD: true, //仅使用经纬度
      };
      that.$store.dispatch("setMobileWindows", d);
src/mobileDivForms/mobileDivForms.js
@@ -86,8 +86,20 @@
        el.addClass(className || '')
        $('#mobile-map_popup_content').append(el)
        // let time;
        // function cons(e) {
        //     time = setTimeout(() => {
        //         console.log(e)
        //         console.log(e.sun._drawingBufferHeight)
        //         console.log("roll: ", e.camera.roll)
        //         console.log("pitch: ", e.camera.pitch)
        //         console.log("heading: ", e.camera.heading)
        //         clearTimeout(time);
        //         time = "";
        //     }, 2000);
        // }
        this._viewer.scene.postRender.addEventListener(function () {
        this._viewer.scene.postRender.addEventListener(function (e) {
            if (!self.isOpen) {
                return;
            }
@@ -95,7 +107,7 @@
                self._viewer.scene,
                position
            )
            // time || cons(e);
            self.positionPopUp(windowCoord, id)
        })
    }
@@ -104,6 +116,7 @@
        if (!windowCoord) {
            return;
        }
        // console.log(windowCoord)
        const wx = document.getElementById('app').clientWidth;
        const x = windowCoord.x - (wx / 100 * 35);
        const y = windowCoord.y - document.getElementById(id).offsetHeight - 15;
src/store/modules/mobile.js
@@ -14,6 +14,7 @@
        popupsDom: '',//mobileDivForms的实体类
        query: {},//传输数据
        openmobileGoTo: false,//测试
        ccDataState: false,//测试
        openmobilePanorama: false,//实景显影
        MobileWindowsHideFixed: true,//改变点击窗口的显示状态--固定窗口
        MobileWindowChangeDataFixed: false,//改变点击窗口的数据--固定窗口
@@ -53,6 +54,10 @@
            state.MobileWindowChangeData = !state.MobileWindowChangeData;
            state.MobileWindowsHide = viewer
        },
        MSETCC_SETCC(state, viewer) {
            state.ccDataState = !state.ccDataState;//专门测试
            state.query = viewer;
        },
        MSET_POPUPDOM(state, viewer) {
            state.popupsDom = viewer
        },
src/styles/mobile/popup.scss
@@ -54,6 +54,10 @@
            font-size: 16px;
            border-radius: 10px 10px 0 0;
            padding: 8px 14px;
            padding-right: 27px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            line-height: 20px;
            box-sizing: border-box;
        }
@@ -89,8 +93,8 @@
                    width: 70px;
                    height: 70px;
                }
                $centerFontSize: 15px;
                //内容显示
                $centerFontSize: 13px;
                .mobileBig-center-our {
                    width: 100%;
                    height: auto;
@@ -102,10 +106,10 @@
                        @extend .centersFlex;
                        .m-c-title {
                            color: #fff;
                            width: 25%;
                            width: 21%;
                        }
                        .m-c-center {
                            width: 75%;
                            width: 79%;
                            // text-indent: 2em;
                            word-wrap: break-word;
                            color: #fff;
@@ -138,7 +142,11 @@
                    content: "";
                    width: 0px;
                    height: 0px;
                    border: 8px solid #29baf1;
                    // background-image: linear-gradient(#29baf1a1, #29baf1a1);
                    border-top: 8px solid transparent;
                    border-bottom: 8px solid #19b3f0a1;
                    border-left: 8px solid transparent;
                    border-right: 8px solid #19b3f0a1;
                    position: absolute;
                    bottom: -8px;
                    left: calc(50% - 8px);
@@ -183,9 +191,9 @@
        div:nth-child(2) {
            display: none !important;
        }
        div:nth-child(3) {
            // border-top: 1px solid #ebebeb;
        }
        // div:nth-child(3) {
        //     // border-top: 1px solid #ebebeb;
        // }
        div {
            width: $controllerw;
            height: $controllerw;