From add483d13841cf472a9adb5c0cc72454f501fb7c Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 30 四月 2024 16:49:54 +0800
Subject: [PATCH] 新增搜索框

---
 src/views/historymode/HistoryMode.vue |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/src/views/historymode/HistoryMode.vue b/src/views/historymode/HistoryMode.vue
index a6576bf..1c71387 100644
--- a/src/views/historymode/HistoryMode.vue
+++ b/src/views/historymode/HistoryMode.vue
@@ -1,11 +1,65 @@
 <template>
   <div class="fy-container">
-    <FactorRadio></FactorRadio>
+    <FactorRadio @change="(e) => (factorType = e)"></FactorRadio>
+    <SearchBar></SearchBar>
   </div>
 </template>
 
 <script>
+import Layer from '@/utils/map/3dLayer';
+import marks from '@/utils/map/marks';
+
 export default {
-  name: 'HistoryPage'
+  name: 'HistoryPage',
+  data() {
+    return {
+      factorType: '',
+      factorDatas: [],
+      merge: false,
+      setCenter: true
+    };
+  },
+  watch: {
+    factorType(nValue, oValue) {
+      if (nValue != oValue) {
+        this.draw();
+      }
+    }
+  },
+  methods: {
+    draw() {
+      const factor = this.factorDatas.factor[this.factorType];
+      this.drawRoadMap(factor);
+      this.drawMassMarks(factor);
+    },
+    // 缁樺埗3D璧拌璺嚎鍥�
+    drawRoadMap(e) {
+      //   this.factorMode = factorMode;
+      // this.factorType = factorType;
+      // this.factorName = factorName;
+      // this.factorDatas.refreshHeight(this.factorType + 1 + '');
+      // this.refreshLegend(this.factorDatas);
+      // this.mapMaker.setFactorType(factorType);
+      // if (!this.mapMaker.runStatus()) {
+
+      Layer.drawRoadMap(this.factorDatas, e, this.merge, this.setCenter);
+      // }
+    },
+    drawMassMarks(e) {
+      marks.drawMassMarks(this.factorDatas, e, () => {
+        // 鏌ヨ鑼冨洿鍐呯殑鐩戞祴绔欑偣
+        // SceneUtil.searchByCoordinate(lnglat[0], lnglat[1], distance);
+        // 3. 瓒嬪娍鍥捐烦杞畾浣�
+        // const progress = FChart.locate(lineChart.chart, lineChart.option, i, _factor.factorName);
+        // 4. 琛ㄦ牸鏁版嵁璺宠浆瀹氫綅
+        // Table.locate(i);
+      });
+    }
+  }
 };
 </script>
+<style scoped>
+.fy-container {
+  background-color: antiquewhite;
+}
+</style>

--
Gitblit v1.9.3