web
2025-06-13 e2150515ac0f387eb26843af0c65cfe71f25d985
src/views/screen/flow/graphic/index.vue
@@ -1,5 +1,5 @@
<script setup>
import {onMounted, ref} from "vue";
import {onMounted, onUnmounted, ref} from "vue";
import {getUserType} from '@/utils/auth.js'
import {getFlowPointList} from '@/api/screen/index'
import {getFlowVideoData} from '@/api/screen/graphic/index.js'
@@ -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)
}
@@ -74,6 +83,10 @@
    getMoitorList()
    getPlayerList(route.params.id || '')
})
onUnmounted(() => {
    if(timer) clearTimeout(timer)
})
</script>
<template>