From 8c30835a41d59e19183434f5f17e6b45b9920f38 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 08 Apr 2022 16:47:59 +0800
Subject: [PATCH] 所有图片资源更换等

---
 src/components/map/components/dimension.vue |  370 +++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 274 insertions(+), 96 deletions(-)

diff --git a/src/components/map/components/dimension.vue b/src/components/map/components/dimension.vue
index 25da64c..5f4f271 100644
--- a/src/components/map/components/dimension.vue
+++ b/src/components/map/components/dimension.vue
@@ -36,71 +36,231 @@
 import axios from 'axios'
 import { mapGetters } from 'vuex'
 import { getDetail } from '@/api/pc/public/arc'
+import baseLayerImgUrl from '@/assets/baseUrl'
 
 let baseLayer = []
 
-const baseLayerImgUrl = [
-    {
-        5000: [
-            {
-                url: 'img/base/1000/1.png',
-                rectangle: [116.346606, 27.965604, 116.3570815, 27.974063]
-            },
-            {
-                url: 'img/base/1000/2.png',
-                rectangle: [116.3570815, 27.965604, 116.367557, 27.974063]
-            },
-            {
-                url: 'img/base/1000/3.png',
-                rectangle: [116.346606, 27.957145, 116.3570815, 27.965604]
-            },
-            {
-                url: 'img/base/1000/4.png',
-                rectangle: [116.3570815, 27.957145, 116.367557, 27.965604]
-            }
-        ]
-    },
-    {
-        4000: [
-            {
-                url: 'img/base/2000/1.png',
-                rectangle: [116.346606, 27.96842366, 116.35358966, 27.974063]
-            },
-            {
-                url: 'img/base/2000/2.png',
-                rectangle: [116.35358966, 27.96842366, 116.36057333, 27.974063]
-            },
-            {
-                url: 'img/base/2000/3.png',
-                rectangle: [116.36057333, 27.96842366, 116.367557, 27.974063]
-            },
-            {
-                url: 'img/base/2000/4.png',
-                rectangle: [116.346606, 27.96278433, 116.35358966, 27.96842366]
-            },
-            {
-                url: 'img/base/2000/5.png',
-                rectangle: [116.35358966, 27.96278433, 116.36057333, 27.96842366]
-            },
-            {
-                url: 'img/base/2000/6.png',
-                rectangle: [116.36057333, 27.96278433, 116.367557, 27.96842366]
-            },
-            {
-                url: 'img/base/2000/7.png',
-                rectangle: [116.346606, 27.957145, 116.35358966, 27.96278433]
-            },
-            {
-                url: 'img/base/2000/8.png',
-                rectangle: [116.35358966, 27.957145, 116.36057333, 27.96278433]
-            },
-            {
-                url: 'img/base/2000/9.png',
-                rectangle: [116.36057333, 27.957145, 116.367557, 27.96278433]
-            }
-        ]
-    }
-]
+// const baseLayerImgUrl = [
+//     {
+//         5000: [
+//             {
+//                 url: 'img/base/1000/1.png',
+//                 rectangle: [116.346606, 27.965604, 116.3570815, 27.974063]
+//             },
+//             {
+//                 url: 'img/base/1000/2.png',
+//                 rectangle: [116.3570815, 27.965604, 116.367557, 27.974063]
+//             },
+//             {
+//                 url: 'img/base/1000/3.png',
+//                 rectangle: [116.346606, 27.957145, 116.3570815, 27.965604]
+//             },
+//             {
+//                 url: 'img/base/1000/4.png',
+//                 rectangle: [116.3570815, 27.957145, 116.367557, 27.965604]
+//             }
+//         ]
+//     },
+//     {
+//         4000: [
+//             {
+//                 url: 'img/base/2000/1.png',
+//                 rectangle: [116.346606, 27.96842366, 116.35358966, 27.974063]
+//             },
+//             {
+//                 url: 'img/base/2000/2.png',
+//                 rectangle: [116.35358966, 27.96842366, 116.36057333, 27.974063]
+//             },
+//             {
+//                 url: 'img/base/2000/3.png',
+//                 rectangle: [116.36057333, 27.96842366, 116.367557, 27.974063]
+//             },
+//             {
+//                 url: 'img/base/2000/4.png',
+//                 rectangle: [116.346606, 27.96278433, 116.35358966, 27.96842366]
+//             },
+//             {
+//                 url: 'img/base/2000/5.png',
+//                 rectangle: [116.35358966, 27.96278433, 116.36057333, 27.96842366]
+//             },
+//             {
+//                 url: 'img/base/2000/6.png',
+//                 rectangle: [116.36057333, 27.96278433, 116.367557, 27.96842366]
+//             },
+//             {
+//                 url: 'img/base/2000/7.png',
+//                 rectangle: [116.346606, 27.957145, 116.35358966, 27.96278433]
+//             },
+//             {
+//                 url: 'img/base/2000/8.png',
+//                 rectangle: [116.35358966, 27.957145, 116.36057333, 27.96278433]
+//             },
+//             {
+//                 url: 'img/base/2000/9.png',
+//                 rectangle: [116.36057333, 27.957145, 116.367557, 27.96278433]
+//             }
+//         ]
+//     }
+// ]
+
+// const baseLayerImgUrl = [
+//     {
+//         700: [
+//             {
+//                 url: 'img/base/700/1.png',
+//                 rectangle: [114.03742429, 27.630906263, 114.03866149, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/700/2.png',
+//                 rectangle: [114.03866149, 27.630906263, 114.03989869, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/700/3.png',
+//                 rectangle: [114.03989869, 27.630906263, 114.04113589, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/700/4.png',
+//                 rectangle: [114.03742429, 27.629461456, 114.03866149, 27.630906263]
+//             }, {
+//                 url: 'img/base/700/5.png',
+//                 rectangle: [114.03866149, 27.629461456, 114.03989869, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/700/6.png',
+//                 rectangle: [114.03989869, 27.629461456, 114.04113589, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/700/7.png',
+//                 rectangle: [114.03742429, 27.62801665, 114.03866149, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/700/8.png',
+//                 rectangle: [114.03866149, 27.62801665, 114.03989869, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/700/9.png',
+//                 rectangle: [114.03989869, 27.62801665, 114.04113589, 27.629461456]
+//             }
+//         ]
+//     },
+//     {
+//         500: [
+//             {
+//                 url: 'img/base/500/1.png',
+//                 rectangle: [114.03742429, 27.630906263, 114.03866149, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/500/2.png',
+//                 rectangle: [114.03866149, 27.630906263, 114.03989869, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/500/3.png',
+//                 rectangle: [114.03989869, 27.630906263, 114.04113589, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/500/4.png',
+//                 rectangle: [114.03742429, 27.629461456, 114.03866149, 27.630906263]
+//             }, {
+//                 url: 'img/base/500/5.png',
+//                 rectangle: [114.03866149, 27.629461456, 114.03989869, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/500/6.png',
+//                 rectangle: [114.03989869, 27.629461456, 114.04113589, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/500/7.png',
+//                 rectangle: [114.03742429, 27.62801665, 114.03866149, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/500/8.png',
+//                 rectangle: [114.03866149, 27.62801665, 114.03989869, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/500/9.png',
+//                 rectangle: [114.03989869, 27.62801665, 114.04113589, 27.629461456]
+//             }
+//         ]
+//     },
+//     {
+//         300: [
+//             {
+//                 url: 'img/base/300/1.png',
+//                 rectangle: [114.03742429, 27.630906263, 114.03866149, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/300/2.png',
+//                 rectangle: [114.03866149, 27.630906263, 114.03989869, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/300/3.png',
+//                 rectangle: [114.03989869, 27.630906263, 114.04113589, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/300/4.png',
+//                 rectangle: [114.03742429, 27.629461456, 114.03866149, 27.630906263]
+//             }, {
+//                 url: 'img/base/300/5.png',
+//                 rectangle: [114.03866149, 27.629461456, 114.03989869, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/300/6.png',
+//                 rectangle: [114.03989869, 27.629461456, 114.04113589, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/300/7.png',
+//                 rectangle: [114.03742429, 27.62801665, 114.03866149, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/300/8.png',
+//                 rectangle: [114.03866149, 27.62801665, 114.03989869, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/300/9.png',
+//                 rectangle: [114.03989869, 27.62801665, 114.04113589, 27.629461456]
+//             }
+//         ]
+//     },
+//     {
+//         150: [
+//             {
+//                 url: 'img/base/150/1.png',
+//                 rectangle: [114.03742429, 27.630906263, 114.03866149, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/150/2.png',
+//                 rectangle: [114.03866149, 27.630906263, 114.03989869, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/150/3.png',
+//                 rectangle: [114.03989869, 27.630906263, 114.04113589, 27.63235107]
+//             },
+//             {
+//                 url: 'img/base/150/4.png',
+//                 rectangle: [114.03742429, 27.629461456, 114.03866149, 27.630906263]
+//             }, {
+//                 url: 'img/base/150/5.png',
+//                 rectangle: [114.03866149, 27.629461456, 114.03989869, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/150/6.png',
+//                 rectangle: [114.03989869, 27.629461456, 114.04113589, 27.630906263]
+//             },
+//             {
+//                 url: 'img/base/150/7.png',
+//                 rectangle: [114.03742429, 27.62801665, 114.03866149, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/150/8.png',
+//                 rectangle: [114.03866149, 27.62801665, 114.03989869, 27.629461456]
+//             },
+//             {
+//                 url: 'img/base/150/9.png',
+//                 rectangle: [114.03989869, 27.62801665, 114.04113589, 27.629461456]
+//             }
+//         ]
+//     }
+// ]
 
 let tilesetLayer = null
 
@@ -132,16 +292,16 @@
 // const fourVH = 800
 // const fiveVH = 950
 
-let viewerHeight = 5000
-let smallViewerHeight = 6000
+let viewerHeight = 700
+let smallViewerHeight = 1700
 
-const mixVH = 2000
-const maxVH = 5000
+const mixVH = 150
+const maxVH = 700
 
-const oneVH = 2000
-const twoVH = 3000
-const fourVH = 4000
-const fiveVH = 5000
+const oneVH = 150
+const twoVH = 300
+const fourVH = 500
+const fiveVH = 700
 
 // const wallLayer = null
 
@@ -185,8 +345,10 @@
                 [114.03954722, 27.62819644, 100],
                 [114.04006133, 27.628038, 100]
             ],
-            mapCenter: [116.3570815,
-                27.965604, 5000]
+            mapCenter: [114.03928009,
+                27.63018386, 700]
+            // mapCenter: [116.35559028,
+            //     27.96548051, 5000]
             // mapCenter: [115.871863, 28.743861, 950.0]
         }
     },
@@ -591,7 +753,8 @@
                                             }
                                         })
                                         viewerHeight = twoVH
-                                        this.$emit('change-wheel', false, 'startWheel')
+                                        that.$emit('change-wheel', false, 'startWheel')
+                                        that.addBaseLayer()
                                         return
                                     }
 
@@ -611,7 +774,8 @@
                                             }
                                         })
                                         viewerHeight = fourVH
-                                        this.$emit('change-wheel', false, 'startWheel')
+                                        that.$emit('change-wheel', false, 'startWheel')
+                                        that.addBaseLayer()
                                         return
                                     }
 
@@ -631,7 +795,8 @@
                                             }
                                         })
                                         viewerHeight = fiveVH
-                                        this.$emit('change-wheel', false, 'startWheel')
+                                        that.$emit('change-wheel', false, 'startWheel')
+                                        that.addBaseLayer()
                                     }
                                 }
                             }
@@ -658,7 +823,8 @@
                                             }
                                         })
                                         viewerHeight = fourVH
-                                        this.$emit('change-wheel', false, 'startWheel')
+                                        that.$emit('change-wheel', false, 'startWheel')
+                                        that.addBaseLayer()
                                         return
                                     }
 
@@ -678,7 +844,8 @@
                                             }
                                         })
                                         viewerHeight = twoVH
-                                        this.$emit('change-wheel', false, 'startWheel')
+                                        that.$emit('change-wheel', false, 'startWheel')
+                                        that.addBaseLayer()
                                         return
                                     }
 
@@ -698,7 +865,8 @@
                                             }
                                         })
                                         viewerHeight = oneVH
-                                        this.$emit('change-wheel', false, 'startWheel')
+                                        that.$emit('change-wheel', false, 'startWheel')
+                                        that.addBaseLayer()
                                     }
                                 }
                             }
@@ -802,6 +970,8 @@
                     item[viewerHeight].forEach(sm => {
                         var layer = global.viewer.imageryLayers.addImageryProvider(new global.DC.Namespace.Cesium.SingleTileImageryProvider({
                             url: sm.url,
+                            tileHeight: 500,
+                            tileWidth: 500,
                             rectangle: global.DC.Namespace.Cesium.Rectangle.fromDegrees(sm.rectangle[0], sm.rectangle[1], sm.rectangle[2], sm.rectangle[3])
                         }))
 
@@ -812,6 +982,7 @@
         },
 
         mapCameraEvent () {
+            const that = this
             global.viewer.camera.setView({
                 orientation: {
                     // 指向
@@ -841,8 +1012,8 @@
                         }
                     })
                     viewerHeight = fourVH
-                    this.$emit('change-wheel', false, 'startWheel')
-                    this.addBaseLayer()
+                    that.$emit('change-wheel', false, 'startWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -862,8 +1033,8 @@
                         }
                     })
                     viewerHeight = twoVH
-                    this.$emit('change-wheel', false, 'startWheel')
-                    this.addBaseLayer()
+                    that.$emit('change-wheel', false, 'startWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -883,8 +1054,8 @@
                         }
                     })
                     viewerHeight = oneVH
-                    this.$emit('change-wheel', false, 'startWheel')
-                    this.addBaseLayer()
+                    that.$emit('change-wheel', false, 'startWheel')
+                    that.addBaseLayer()
                 }
             } else { // 上
                 if (viewerHeight == oneVH) {
@@ -903,8 +1074,8 @@
                         }
                     })
                     viewerHeight = twoVH
-                    this.$emit('change-wheel', false, 'startWheel')
-                    this.addBaseLayer()
+                    that.$emit('change-wheel', false, 'startWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -924,8 +1095,8 @@
                         }
                     })
                     viewerHeight = fourVH
-                    this.$emit('change-wheel', false, 'startWheel')
-                    this.addBaseLayer()
+                    that.$emit('change-wheel', false, 'startWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -945,13 +1116,14 @@
                         }
                     })
                     viewerHeight = fiveVH
-                    this.$emit('change-wheel', false, 'startWheel')
-                    this.addBaseLayer()
+                    that.$emit('change-wheel', false, 'startWheel')
+                    that.addBaseLayer()
                 }
             }
         },
 
         smallMapCameraEvent () {
+            const that = this
             global.eagleViewer.camera.setView({
                 orientation: {
                     // 指向
@@ -981,7 +1153,8 @@
                         }
                     })
                     smallViewerHeight = fourVH + 1000
-                    this.$emit('change-wheel', false, 'startSmallWheel')
+                    that.$emit('change-wheel', false, 'startSmallWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -1001,7 +1174,8 @@
                         }
                     })
                     smallViewerHeight = twoVH + 1000
-                    this.$emit('change-wheel', false, 'startSmallWheel')
+                    that.$emit('change-wheel', false, 'startSmallWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -1021,7 +1195,8 @@
                         }
                     })
                     smallViewerHeight = oneVH + 1000
-                    this.$emit('change-wheel', false, 'startSmallWheel')
+                    that.$emit('change-wheel', false, 'startSmallWheel')
+                    that.addBaseLayer()
                 }
             } else { // 上
                 if (smallViewerHeight == oneVH + 1000) {
@@ -1040,7 +1215,8 @@
                         }
                     })
                     smallViewerHeight = twoVH + 1000
-                    this.$emit('change-wheel', false, 'startSmallWheel')
+                    that.$emit('change-wheel', false, 'startSmallWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -1060,7 +1236,8 @@
                         }
                     })
                     smallViewerHeight = fourVH + 1000
-                    this.$emit('change-wheel', false, 'startSmallWheel')
+                    that.$emit('change-wheel', false, 'startSmallWheel')
+                    that.addBaseLayer()
                     return
                 }
 
@@ -1080,7 +1257,8 @@
                         }
                     })
                     smallViewerHeight = fiveVH + 1000
-                    this.$emit('change-wheel', false, 'startSmallWheel')
+                    that.$emit('change-wheel', false, 'startSmallWheel')
+                    that.addBaseLayer()
                 }
             }
         },

--
Gitblit v1.9.3