소스 검색

Merge branch 'master' of http://39.101.69.29:3000/sunzehao/cesium_three

Koishi 1 개월 전
부모
커밋
63caa52c62
2개의 변경된 파일50개의 추가작업 그리고 2개의 파일을 삭제
  1. 26 0
      src/views/cesiumComponents/windMap2D.vue
  2. 24 2
      src/views/cesiumComponents/windView.vue

+ 26 - 0
src/views/cesiumComponents/windMap2D.vue

@@ -1,4 +1,7 @@
 <template>
+    <div id="loading" class="dataLoading" v-if="loading">
+        <span class="loadText">数据加载中...</span>
+    </div>
   <div class="mapBox">
     <div id="cesiumContainer" style="width: 100%; height: 100vh"></div>
     <div :class="!menuComTStyB ? 'menuComTSty' : 'menuComT'" v-if="0">
@@ -124,6 +127,7 @@ export default {
   },
   data() {
     return {
+        loading: true,
       viewer: null,
       windLayer: null, // 风场图
       windLayerTimmer: null, // 风场图计时器
@@ -156,6 +160,9 @@ export default {
   },
   mounted() {
     this.initCesium();
+    setTimeout(() =>{
+        this.loading = false
+    }, 1000)
   },
   methods: {
     async initCesium() {
@@ -1280,6 +1287,25 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.dataLoading {
+    width: 100vw;
+    height: 100vh;
+    background: rgba(0, 0, 0, 0.5);
+    z-index: 999;
+    position: fixed;
+    .loadText{
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+        background: rgba(255, 255, 255, 0.7);
+        padding: 15px 20px;
+        border-radius: 6px;
+        color: black;
+        font-size: 14px;
+        font-weight: bold;
+    }
+  }
 .mapBox {
   width: 100%;
   height: 100%;

+ 24 - 2
src/views/cesiumComponents/windView.vue

@@ -37,9 +37,9 @@
             </div>
             <div class="stat-block2">
                 <span class="labels">范围 </span>
-                <span class="values">0.0</span><span class="values">{{scopeUnit()}}</span>
+                <span class="values">{{scopeNumMin()}}</span><span class="values">{{scopeUnit()}}</span>
                 <span :class="scopeColor()"></span>
-                <span class="values">100.0</span><span class="values">{{scopeUnit()}}</span>
+                <span class="values">{{scopeNumMax()}}</span><span class="values">{{scopeUnit()}}</span>
             </div>
             <div class="stat-block2">
                 <span class="labels">高度 </span>
@@ -864,6 +864,28 @@ export default {
                 return "(mm)"
             } 
         },
+        scopeNumMin() {
+            if (this.showCover === "风场") {
+                return "0.0"
+            } else if (this.showCover === "温度") {
+                return "-12"
+            } else if (this.showCover === "云层") {
+                return "0.0"
+            } else if (this.showCover === "降雨") {
+                return "0.0"
+            } 
+        },
+        scopeNumMax() {
+            if (this.showCover === "风场") {
+                return "25.0"
+            } else if (this.showCover === "温度") {
+                return "40"
+            } else if (this.showCover === "云层") {
+                return "100.0"
+            } else if (this.showCover === "降雨") {
+                return "50"
+            } 
+        },
         backStations() {
             // this.$emit("backStations")
             this.$router.push({