From 4097cc9ad6c60bbb5e9864d3f54a37cfbb40026e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 05 三月 2025 15:31:28 +0800 Subject: [PATCH] 临时:路网版本 --- src/views/realtimemode/RealtimeMode.vue | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/views/realtimemode/RealtimeMode.vue b/src/views/realtimemode/RealtimeMode.vue index 5ec6009..da8a10b 100644 --- a/src/views/realtimemode/RealtimeMode.vue +++ b/src/views/realtimemode/RealtimeMode.vue @@ -28,7 +28,7 @@ import moment from 'moment'; 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 +55,7 @@ deviceType: TYPE0, deviceCode: '', // 鐩戞祴鍥犲瓙鐨勭被鍨嬬紪鍙� - factorType: radioOptions(TYPE0)[0].value, + factorType: defaultOptions(TYPE0), // 鏂拌幏鍙栫殑鐩戞祴鏁版嵁 factorDatas: new FactorDatas(), // 鍏ㄩ儴鐩戞祴鏁版嵁 @@ -103,13 +103,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 +149,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, -- Gitblit v1.9.3