From d16d04d80e42802e9caaacee9617159921e18b93 Mon Sep 17 00:00:00 2001
From: web <candymxq888@outlook.com>
Date: 星期六, 07 六月 2025 16:14:33 +0800
Subject: [PATCH] fix:监控添加定时器获取数据

---
 src/views/screen/flow/graphic/index.vue |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/views/screen/flow/graphic/index.vue b/src/views/screen/flow/graphic/index.vue
index a769c19..b8859bb 100644
--- a/src/views/screen/flow/graphic/index.vue
+++ b/src/views/screen/flow/graphic/index.vue
@@ -16,6 +16,7 @@
 const playerData = ref([])
 const showFullScreen = ref(false)
 const fullIndex = ref()
+let timer = null
 
 // 全屏弹窗
 const handleFullScreen = (index) => {
@@ -67,6 +68,14 @@
     getFlowVideoData({pointId: id, pointName: searchVal.value}).then(async res => {
         playerData.value = res.data
     })
+
+    if(timer) clearTimeout(timer)
+
+    timer = setInterval(() => {
+        getFlowVideoData({pointId: id, pointName: searchVal.value}).then(async res => {
+            playerData.value = res.data
+        })
+    }, 10000)
 }
 
 
@@ -121,7 +130,7 @@
                     <div class="item" v-for="(item, index) in playerData" :key="index">
                         <div class="title">{{ item.pointName }}</div>
                         <div class="item-video" :id="`player${index}`">
-                            <VideoPlayer :item="item" :autoPlay="false" />
+                            <VideoPlayer :item="item" :autoPlay="true" />
                         </div>
                         <div class="info">
                             <div class="info-list">

--
Gitblit v1.9.3