From ead73b4e3a20d15d03ed662fe1850393a4decfa3 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 11 Mar 2022 18:12:12 +0800
Subject: [PATCH] viewer更改

---
 src/components/mobilemap/index.vue |   98 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 66 insertions(+), 32 deletions(-)

diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 8f8e9c9..4376950 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -86,14 +86,15 @@
                 [116.41526036, 27.95352217, 100]
             ],
             areaLayer: null,
-            mapCenter: [115.871863, 28.743861, 400.0],
+            mapCenter: [115.871863, 28.743861, 160.0],
+            //   mapCenter: [114.04062292 - 0.00035, 27.62666834 + 0.0025, 160.0],
             // 控制4层缩放
             onelayerNum: 80,
             towlayerNum: 120,
             threelayerNum: 160,
-            forlayerNum: 200,
+            forlayerNum: null,
             intervallayerNum: 20,
-            frislayertHeight: 160 // 默认高度
+            frislayertHeight: 120 // 默认高度
             // onelayerNum: 80,
             // towlayerNum: 200,
             // threelayerNum: 320,
@@ -314,8 +315,9 @@
                 // if (height > 200 && isSet) {
                 //   conBack(200);
                 // }
-                if (height > that.forlayerNum && isSet) {
-                    conBack(that.forlayerNum)
+                const usMun = that.forlayerNum ? that.forlayerNum : that.threelayerNum
+                if (height > usMun && isSet) {
+                    conBack(usMun)
                 }
             })
 
@@ -359,9 +361,11 @@
                             // if (height > 100) {
                             //   butSetViews(80);
                             // }
-                            if (height > that.forlayerNum - that.intervallayerNum) {
-                                butSetViews(that.threelayerNum)
-                                return
+                            if (that.forlayerNum) {
+                                if (height > that.forlayerNum - that.intervallayerNum) {
+                                    butSetViews(that.threelayerNum)
+                                    return
+                                }
                             }
 
                             if (height > that.threelayerNum - that.intervallayerNum) {
@@ -406,11 +410,13 @@
                                 butSetViews(that.threelayerNum)
                             }
 
-                            if (
-                                height > that.threelayerNum - that.intervallayerNum &&
-                                height < that.forlayerNum - that.intervallayerNum
-                            ) {
-                                butSetViews(that.forlayerNum)
+                            if (that.forlayerNum) {
+                                if (
+                                    height > that.threelayerNum - that.intervallayerNum &&
+                                    height < that.forlayerNum - that.intervallayerNum
+                                ) {
+                                    butSetViews(that.forlayerNum)
+                                }
                             }
                         }
                     }
@@ -493,11 +499,13 @@
                                         ) {
                                             setViews(that.threelayerNum)
                                         }
-                                        if (
-                                            height >= that.threelayerNum + 2 &&
-                                            height < that.forlayerNum
-                                        ) {
-                                            setViews(that.forlayerNum)
+                                        if (that.forlayerNum) {
+                                            if (
+                                                height >= that.threelayerNum + 2 &&
+                                                height < that.forlayerNum
+                                            ) {
+                                                setViews(that.forlayerNum)
+                                            }
                                         }
                                     }
                                     // 放大
@@ -514,11 +522,13 @@
                                     //     setViews(80);
                                     //   }
                                     if (cutHeight < -2) {
-                                        if (
-                                            height <= that.forlayerNum &&
-                                            height > that.threelayerNum - 2
-                                        ) {
-                                            setViews(that.threelayerNum)
+                                        if (that.forlayerNum) {
+                                            if (
+                                                height <= that.forlayerNum &&
+                                                height > that.threelayerNum - 2
+                                            ) {
+                                                setViews(that.threelayerNum)
+                                            }
                                         }
                                         if (
                                             height <= that.threelayerNum - 2 &&
@@ -595,18 +605,15 @@
 
             const silhouetteBlue =
                 global.DC.Namespace.Cesium.PostProcessStageLibrary.createEdgeDetectionStage()
-            silhouetteBlue.uniforms.color = global.DC.Namespace.Cesium.Color.fromBytes(
-                9,
-                162,
-                40
-            )
+            silhouetteBlue.uniforms.color =
+                global.DC.Namespace.Cesium.Color.fromBytes(9, 162, 40)
             silhouetteBlue.uniforms.length = 0.01
             silhouetteBlue.selected = []
 
             viewer.scene.postProcessStages.add(
-                global.DC.Namespace.Cesium.PostProcessStageLibrary.createSilhouetteStage([
-                    silhouetteBlue
-                ])
+                global.DC.Namespace.Cesium.PostProcessStageLibrary.createSilhouetteStage(
+                    [silhouetteBlue]
+                )
             )
 
             var highlighted = {
@@ -978,7 +985,7 @@
                 that.$store.commit('set_frislayertHeight', that.frislayertHeight) // 送入默认弹窗高度
                 that.$store.commit('set_zoomRange', [
                     that.onelayerNum,
-                    that.forlayerNum
+                    that.forlayerNum ? that.forlayerNum : that.threelayerNum
                 ]) // 送入移动端缩放范围
                 that.$store.commit('MSET_DIMENSION', '2.5D') // 切换2.5D设置
             } else if (that.dimension == '3D') {
@@ -1054,6 +1061,33 @@
                         useJWD: true // 仅使用经纬度
                     }
                     that.$store.dispatch('setMobileWindows', d)
+                } else if (that.urlParameterData.methods == 'arc') {
+                    const objInit = {
+                        name: that.urlParameterData.mechanismname,
+                        lntLat: [that.urlParameterData.jd, that.urlParameterData.wd],
+                        alt: that.urlParameterData.gd,
+                        heading: that.urlParameterData.heading,
+                        pitch: that.urlParameterData.pitch,
+                        roll: that.urlParameterData.roll,
+                        bgImg: that.urlParameterData.tpurl,
+                        QRImg: that.urlParameterData.codeurl,
+                        websiteUrl: that.urlParameterData.websiteurl,
+                        telePhone: that.urlParameterData.telephone,
+                        address: that.urlParameterData.address,
+                        introduce: that.urlParameterData.introduce,
+                        video: that.urlParameterData.videourl,
+                        panoramaurl: that.urlParameterData.panoramaurl // 全景
+                    }
+
+                    const dataInitialization = {
+                        position: {},
+                        lntLat: objInit.lntLat,
+                        query: { ...objInit },
+                        useJWD: true, // 仅使用经纬度
+                        from: 'PopupOurOnce'
+                    }
+
+                    that.popupsDom = that.$store.dispatch('setMobileWindows', dataInitialization)
                 }
             }
         }, 0)

--
Gitblit v1.9.3