From 90671325090a58b0dfc91dac6a84b1c2a09eaac7 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 27 三月 2025 17:29:27 +0800
Subject: [PATCH] 修复绘制轨迹线时,上一组数据没有清除的问题

---
 src/views/historymode/HistoryMode.vue |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/views/historymode/HistoryMode.vue b/src/views/historymode/HistoryMode.vue
index b63cf49..97c9982 100644
--- a/src/views/historymode/HistoryMode.vue
+++ b/src/views/historymode/HistoryMode.vue
@@ -19,6 +19,7 @@
       <FactorLegend
         class="m-t-2"
         :factor="factorDatas.factor[factorType]"
+        @change="handleLegendTypeChange"
       ></FactorLegend>
     </el-row>
     <el-row class="historical" justify="center">
@@ -134,6 +135,15 @@
         this.sceneStore.searchScene(lng, lat);
       }
     },
+    handleLegendTypeChange(value, done) {
+      if (value) {
+        this.factorDatas.resetRange();
+      } else {
+        this.factorDatas.standardRange();
+      }
+      done();
+      this.draw();
+    },
     draw() {
       // 鍒锋柊鍥句緥
       const factor = this.factorDatas.factor[this.factorType];
@@ -145,10 +155,10 @@
     // 缁樺埗3D璧拌璺嚎鍥�
     drawRoadMap(e) {
       this.factorDatas.refreshHeight(this.factorType);
-
       Layer.drawRoadMap(this.factorDatas, e, this.merge, this.setCenter);
     },
     drawRoadLine(e) {
+      this.factorDatas.refreshHeight(this.factorType);
       mapLine.drawLine(this.factorDatas, e);
     },
     drawMassMarks(e) {

--
Gitblit v1.9.3