From 5f44d21b3921abc88506a7ec46b3fe6f078664aa Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 14 三月 2025 15:33:24 +0800
Subject: [PATCH] 新增走航融合功能(初版)

---
 src/views/realtimemode/RealtimeMode.vue |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/views/realtimemode/RealtimeMode.vue b/src/views/realtimemode/RealtimeMode.vue
index 5ec6009..7fce948 100644
--- a/src/views/realtimemode/RealtimeMode.vue
+++ b/src/views/realtimemode/RealtimeMode.vue
@@ -26,9 +26,10 @@
 
 <script>
 import moment from 'moment';
+import mapUtil from '@/utils/map/util';
 import { useFetchData } from '@/composables/fetchData';
 import { TYPE0 } from '@/constant/device-type';
-import { radioOptions } from '@/constant/radio-options';
+import { defaultOptions } from '@/constant/radio-options';
 import { FactorDatas } from '@/model/FactorDatas';
 import DashBoard from './component/DashBoard.vue';
 import RealTimeTrend from './component/RealTimeTrend.vue';
@@ -55,7 +56,7 @@
       deviceType: TYPE0,
       deviceCode: '',
       // 鐩戞祴鍥犲瓙鐨勭被鍨嬬紪鍙�
-      factorType: radioOptions(TYPE0)[0].value,
+      factorType: defaultOptions(TYPE0),
       // 鏂拌幏鍙栫殑鐩戞祴鏁版嵁
       factorDatas: new FactorDatas(),
       // 鍏ㄩ儴鐩戞祴鏁版嵁
@@ -103,13 +104,16 @@
     },
     fetchRealTimeData() {
       this.fetchData((page) => {
-        return fetchHistoryData({
-          deviceCode: this.deviceCode,
-          // startTime: '2024-08-20 06:00:00',
-          // endTime: '2024-08-20 06:02:00',
-          page,
-          perPage: 100
-        }).then((res) => {
+        return fetchHistoryData(
+          {
+            deviceCode: this.deviceCode,
+            // startTime: '2024-08-20 06:00:00',
+            // endTime: '2024-08-20 06:02:00',
+            page,
+            perPage: 100
+          },
+          false
+        ).then((res) => {
           this.onFetchData(res.data);
           this.onMapData(res.data);
           // if (res.data.length > 0) {
@@ -146,7 +150,7 @@
         this.notFirstFetch = true;
       }
       startIndex = startIndex < 0 ? 0 : startIndex;
-      return new Promise((resolve, reject) => {
+      return new Promise(() => {
         this.allFactorDatas.addData(dataList, this.drawMode, () => {
           realTimeMapAnimation.moveAnimation(
             this.allFactorDatas,
@@ -170,6 +174,7 @@
   unmounted() {
     this.clearFetchingTask();
     realTimeMapAnimation.stop();
+    mapUtil.clearMap();
   }
 };
 </script>

--
Gitblit v1.9.3