Browse Source

样式功能修改

sunzehao 1 month ago
parent
commit
1976cbd34a
2 changed files with 14 additions and 13 deletions
  1. 1 0
      src/components/windHome/index.vue
  2. 13 13
      src/views/cesiumComponents/topographicMap.vue

+ 1 - 0
src/components/windHome/index.vue

@@ -1509,6 +1509,7 @@ export default {
   position: relative;
   width: 100%;
   height: 39px;
+  line-height: 39px;
   border-bottom: 1px solid rgba(153, 153, 153, 0.5);
   font-size: 14px;
   font-family: Microsoft YaHei;

+ 13 - 13
src/views/cesiumComponents/topographicMap.vue

@@ -120,10 +120,10 @@ export default {
             // this.csceneElliposid(viewer)
             viewer.camera.flyTo({
                 // destination: Cesium.Cartesian3.fromDegrees(106.44, 37.27, 2000),// 场站位置
-                destination: Cesium.Cartesian3.fromDegrees(106.793187, 37.388150, 6000),
+                destination: Cesium.Cartesian3.fromDegrees(106.793187, 37.388150, 4000),
                 orientation: {
                     heading: -0.3,
-                    pitch: -0.5,
+                    pitch: -0.2,
                     roll: 0,
                 },
                 duration: 3,
@@ -223,14 +223,14 @@ export default {
                     console.log('标签或模型数据!', val);
                     that.modelVal = val
                     // 找到实体,显示包含实体信息的弹框
-                    that.showRightClickPopup(position, viewer);
+                    that.showRightClickPopup(position, viewer, val);
                     return;
                 }
 
             }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
             
         },
-        showRightClickPopup(screenPosition, viewer) {
+        showRightClickPopup(screenPosition, viewer, val) {
             // 创建或获取弹框元素
             var popup = document.getElementById('rightClickPopup');
             if (!popup) {
@@ -345,7 +345,7 @@ export default {
                     console.log('点击了菜单项:', messageType);
 
                     // 调用您的 showMessage 函数
-                    that.showMessage(messageType);
+                    that.showMessage(messageType, val);
                     hidePopup()
 
                     // 可选:执行后关闭弹框
@@ -363,17 +363,17 @@ export default {
             document.addEventListener('click', popupMenuItemClick);
             document.addEventListener('keydown', keyDownHandler);
         },
-        showMessage(val) {
-            console.log('val===>>>', val)
+        showMessage(type, val) {
+            console.log('type===>>>', type)
             this.windDrawer = true
-            this.windDrawerHeader = '各风机数据详情'
-            if (val === 'basic') {
+            this.windDrawerHeader = val.name+'数据详情'
+            if (type === 'basic') {
                 this.windDrawerTitle = '基础信息'
                 this.showBasicMsg = true
-            } else if(val === 'video') {
+            } else if(type === 'video') {
                 this.windDrawerTitle = '视频监控'
                 this.showVideoMsg = true
-            } else if(val === 'problem') {
+            } else if(type === 'problem') {
                 this.windDrawerTitle = '故障查看'
                 this.showProblemMsg = true
             }
@@ -460,10 +460,10 @@ export default {
         resetViewport() {
         // 设置初始视图为宁夏
         this.viewer.camera.flyTo({
-            destination: Cesium.Cartesian3.fromDegrees(106.793187, 37.388150, 6000),
+            destination: Cesium.Cartesian3.fromDegrees(106.793187, 37.388150, 4000),
             orientation: {
                 heading: -0.3,
-                pitch: -0.5,
+                pitch: -0.2,
                 roll: 0,
             },
             duration: 3,