From c40500d288339cd9b2200f8f909e3cd5471c0c22 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 30 八月 2024 17:38:29 +0800
Subject: [PATCH] 1. 优化3D动画中风向的变化逻辑; 2. 修复折线图切换因子时,数据直接跳转至起始处的问题; 3. 折线图和表格加回风向因子; 4. 优化风向的均值计算为矢量计算,同时最大最小值不显示; 5. 新增表格数据导出功能;

---
 src/views/historymode/HistoryMode.vue |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/views/historymode/HistoryMode.vue b/src/views/historymode/HistoryMode.vue
index 9df700d..cbf22c8 100644
--- a/src/views/historymode/HistoryMode.vue
+++ b/src/views/historymode/HistoryMode.vue
@@ -42,6 +42,7 @@
       @table-click="handelIndexChange"
       :factor-datas="factorDatas"
       :device-type="deviceType"
+      :device-code="deviceCode"
     ></DataSheet>
   </div>
 </template>
@@ -152,21 +153,28 @@
       mapUtil.setCenter(pr.p);
       // mapUtil.setFitSector(pr);
       // 2. 缁樺埗瀵硅瘽妗�
-      DialogUtil.openNewWindow(this.deviceCode, this.factorDatas, index, () => {
-        // 绉婚櫎鎵囧舰鍖哄煙
-        sector.clearSector();
-      });
+      DialogUtil.openNewWindow(
+        this.deviceType,
+        this.deviceCode,
+        this.factorDatas,
+        index,
+        () => {
+          // 绉婚櫎鎵囧舰鍖哄煙
+          sector.clearSector();
+        }
+      );
     },
-    onFetchData(type, data) {
+    onFetchData(deviceType, data) {
       // todo 鏍规嵁璁惧绫诲瀷鍒囨崲鍦板浘鐩戞祴鍥犲瓙灞曠ず鍗曢�夋銆佹姌绾垮浘澶嶉�夋銆佹暟鎹〃鏍煎閫夋鐨勫洜瀛愮被鍨�
-      this.deviceType = type;
+      this.deviceType = deviceType;
       this.factorDatas.setData(data, this.drawMode, () => {
         this.factorDatas.refreshHeight(this.factorType);
         this.draw();
       });
     },
     fetchHistroyData(option) {
-      const { deviceCode, type, timeArray } = option;
+      const { deviceType, deviceCode, timeArray } = option;
+      this.deviceType = deviceType;
       this.deviceCode = deviceCode;
       let startTime, endTime;
       if (timeArray && timeArray.length == 2) {
@@ -175,12 +183,13 @@
       }
       this.fetchData((page, pageSize) => {
         return fetchHistoryData({
+          deviceType,
           deviceCode,
           startTime,
           endTime,
           page,
           perPage: pageSize
-        }).then((res) => this.onFetchData(type, res.data));
+        }).then((res) => this.onFetchData(deviceType, res.data));
       });
     }
     // fetchRealTimeData() {

--
Gitblit v1.9.3