From 6c75516f1ba668873807cef33aa996d25cdf16c4 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 13 五月 2025 17:43:06 +0800
Subject: [PATCH] 新增动态溯源异常更新列表

---
 src/views/realtimemode/RealtimeMode.vue |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/views/realtimemode/RealtimeMode.vue b/src/views/realtimemode/RealtimeMode.vue
index 5ec6009..af30d78 100644
--- a/src/views/realtimemode/RealtimeMode.vue
+++ b/src/views/realtimemode/RealtimeMode.vue
@@ -14,6 +14,7 @@
         class="m-t-2"
         :factor="factorDatas.factor[factorType]"
       ></FactorLegend>
+      <!-- <SourceTrace></SourceTrace> -->
     </el-row>
     <DashBoard class="dash-board" :factor-datas="factorDatas"></DashBoard>
     <RealTimeTrend
@@ -26,13 +27,15 @@
 
 <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';
 import DeviceChange from './component/DeviceChange.vue';
+import SourceTrace from '@/views/sourcetrace/SourceTrace.vue';
 import { realTimeMapAnimation } from '@/utils/map/animation';
 import {
   fetchHistoryData,
@@ -44,7 +47,7 @@
 // const mapAnimation = new MapAnimation();
 
 export default {
-  components: { DashBoard, RealTimeTrend, DeviceChange },
+  components: { DashBoard, RealTimeTrend, DeviceChange, SourceTrace },
   setup() {
     const { loading, fetchData } = useFetchData(10000);
     return { loading, fetchData };
@@ -55,7 +58,7 @@
       deviceType: TYPE0,
       deviceCode: '',
       // 鐩戞祴鍥犲瓙鐨勭被鍨嬬紪鍙�
-      factorType: radioOptions(TYPE0)[0].value,
+      factorType: defaultOptions(TYPE0).value,
       // 鏂拌幏鍙栫殑鐩戞祴鏁版嵁
       factorDatas: new FactorDatas(),
       // 鍏ㄩ儴鐩戞祴鏁版嵁
@@ -103,13 +106,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 +152,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 +176,7 @@
   unmounted() {
     this.clearFetchingTask();
     realTimeMapAnimation.stop();
+    mapUtil.clearMap();
   }
 };
 </script>

--
Gitblit v1.9.3