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/model/FactorDatas.js |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/model/FactorDatas.js b/src/model/FactorDatas.js
index b6b1d30..d3c2c1a 100644
--- a/src/model/FactorDatas.js
+++ b/src/model/FactorDatas.js
@@ -1,5 +1,5 @@
-import { Factor } from "./Factor";
-import calculate from "@/utils/map/calculate";
+import { Factor } from './Factor';
+import calculate from '@/utils/map/calculate';
 
 /**
  *
@@ -47,6 +47,9 @@
         }]
         */
   setData: function (dataList, drawMode, callback) {
+    if (dataList.length == 0) {
+      return;
+    }
     this.clearData();
 
     dataList.forEach((d) => {
@@ -62,13 +65,15 @@
       });
     });
 
-    
-
     this.convertGPS(this.lnglats_GPS, callback);
   },
 
   // 鏂板涓�涓柊鏁版嵁
   addData: function (dataList, drawMode, callback) {
+    if (dataList.length == 0) {
+      return;
+    }
+
     var newGps = [];
     dataList.forEach((data) => {
       this.times.push(data.time);
@@ -162,7 +167,7 @@
   // 鑾峰彇鏁版嵁闀垮害
   length: function () {
     return this.lnglats_GD.length;
-  },
+  }
 };
 
 export { FactorDatas };

--
Gitblit v1.9.3