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,12 +68,24 @@
    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)
}
onMounted(() => {
    getMoitorList()
    getPlayerList(route.params.id || '')
})
onUnmounted(() => {
    if(timer) clearTimeout(timer)
})
</script>
@@ -121,7 +134,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">