From 9e43f80d96bda7f1108dcfcfd7340e567f2e48d0 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 23 Dec 2021 13:57:03 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web

---
 src/components/mobileWindow/index.vue        |   11 ++
 src/components/mobilemap/index.vue           |  138 +++++++++++++++++++++------------
 src/components/mobileCortrolButtom/index.vue |   17 ++-
 src/styles/mobile/popup.scss                 |   22 +++-
 src/components/mobileLeftNav/index.vue       |    3 
 src/store/modules/mobile.js                  |    5 +
 src/components/mobileCortrol/index.vue       |    3 
 src/components/mobilePopupOurOnce/index.vue  |    1 
 src/mobileDivForms/mobileDivForms.js         |   17 +++
 9 files changed, 145 insertions(+), 72 deletions(-)

diff --git a/src/components/mobileCortrol/index.vue b/src/components/mobileCortrol/index.vue
index b490414..82a5c80 100644
--- a/src/components/mobileCortrol/index.vue
+++ b/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,
diff --git a/src/components/mobileCortrolButtom/index.vue b/src/components/mobileCortrolButtom/index.vue
index b851a50..251dacc 100644
--- a/src/components/mobileCortrolButtom/index.vue
+++ b/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,
diff --git a/src/components/mobileLeftNav/index.vue b/src/components/mobileLeftNav/index.vue
index ccf3c39..a533ef5 100644
--- a/src/components/mobileLeftNav/index.vue
+++ b/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,
diff --git a/src/components/mobilePopupOurOnce/index.vue b/src/components/mobilePopupOurOnce/index.vue
index bb3a62e..39759a2 100644
--- a/src/components/mobilePopupOurOnce/index.vue
+++ b/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); //关闭全屏弹窗
diff --git a/src/components/mobileWindow/index.vue b/src/components/mobileWindow/index.vue
index e373fd8..e7ae014 100644
--- a/src/components/mobileWindow/index.vue
+++ b/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",
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 0b9f4df..cf5597c 100644
--- a/src/components/mobilemap/index.vue
+++ b/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);
diff --git a/src/mobileDivForms/mobileDivForms.js b/src/mobileDivForms/mobileDivForms.js
index 25cb2ed..9e95996 100644
--- a/src/mobileDivForms/mobileDivForms.js
+++ b/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;
diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index 16b0434..dd9a9c0 100644
--- a/src/store/modules/mobile.js
+++ b/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
         },
diff --git a/src/styles/mobile/popup.scss b/src/styles/mobile/popup.scss
index a006b78..eece555 100644
--- a/src/styles/mobile/popup.scss
+++ b/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;

--
Gitblit v1.9.3