From aa75a9d46ee325f0a92e42f733aabb1f92103aeb Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 28 三月 2025 17:44:29 +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..240930d 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).value, // 鏂拌幏鍙栫殑鐩戞祴鏁版嵁 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