From 3832a82fb79d4cec4cca5e2854e54953f2095ef8 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 06 九月 2024 16:55:08 +0800
Subject: [PATCH] 1. 添加溯源清单功能 2. 修复切换至走航监测界面后,之前正在加载的历史数据依旧展示至地图的问题 3. 添加折线图下载图片功能; 4. 添加数据导出功能; 5. 添加设备管理功能; 6. 添加数据弹框和溯源清单开关功能; 7. 优化3D里面的颜色展示逻辑,底部颜色由原来的因子最小值颜色改为当前量级的上一个量级对应的颜色

---
 src/components/monitor/WeatherData.vue |   47 ++++++++++++++++++++++++++++++++---------------
 1 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/src/components/monitor/WeatherData.vue b/src/components/monitor/WeatherData.vue
index 85d436a..af32269 100644
--- a/src/components/monitor/WeatherData.vue
+++ b/src/components/monitor/WeatherData.vue
@@ -2,10 +2,10 @@
   <el-row class="wrap">
     <el-form :inline="true" class="form">
       <el-form-item label="娓╁害锛�" class="w-tag">
-        {{ temprature }}
+        {{ temprature }}鈩�
       </el-form-item>
       <el-form-item label="婀垮害锛�" class="w-tag">
-        {{ humidity }}
+        {{ humidity }}%
       </el-form-item>
     </el-form>
     <!-- <div class="w-tag">{{ temprature }}</div>
@@ -14,10 +14,10 @@
   <el-row class="wrap">
     <el-form :inline="true" class="form">
       <el-form-item label="椋庡悜锛�" class="w-tag">
-        {{ windDirection }}
+        {{ _windDir }}
       </el-form-item>
       <el-form-item label="椋庨�燂細" class="w-tag">
-        {{ windSpeed }}
+        {{ windSpeed }}m/s
       </el-form-item>
     </el-form>
     <!-- <div class="w-tag">{{ windDirection }}</div>
@@ -26,31 +26,48 @@
 </template>
 <script>
 import { FactorDatas } from '@/model/FactorDatas';
+import { windDir } from '@/constant/wind-dir';
 
 export default {
   props: {
     loading: Boolean,
-    factorDatas: FactorDatas
+    factorDatas: FactorDatas,
+    temprature: {
+      type: String,
+      default: '--'
+    },
+    humidity: {
+      type: String,
+      default: '--'
+    },
+    windDirection: {
+      type: String,
+      default: '--'
+    },
+    windSpeed: {
+      type: String,
+      default: '--'
+    }
   },
   data() {
-    return {
-      temprature: '--鈩�',
-      humidity: '--%',
-      windDirection: '--',
-      windSpeed: '--m/s'
-    };
+    return {};
   },
   watch: {
     factorDatas: {
       handler(nV) {
-        this.temprature = this.lastOne(nV, '8') + '鈩�';
-        this.humidity = this.lastOne(nV, '9') + '%';
-        this.windDirection = this.lastOne(nV, '17');
-        this.windSpeed = this.lastOne(nV, '16') + 'm/s';
+        // this.temprature = this.lastOne(nV, '8') + '鈩�';
+        // this.humidity = this.lastOne(nV, '9') + '%';
+        // this.windDirection = this.lastOne(nV, '17');
+        // this.windSpeed = this.lastOne(nV, '16') + 'm/s';
       },
       deep: true
     }
   },
+  computed: {
+    _windDir() {
+      return windDir(this.windDirection);
+    }
+  },
   methods: {
     lastOne(factorDatas, key) {
       const f = factorDatas.factor[key];

--
Gitblit v1.9.3