This commit is contained in:
duanliang
2025-04-02 19:47:19 +08:00
parent 3b3d243d27
commit e4f3e67f4b
2 changed files with 10 additions and 3 deletions

View File

@@ -119,9 +119,10 @@
props.isCollect = 1
} else {
props.isCollect = 0
modelValue.value = false
}
pubSub.publish('videoCollect', props.cameraIndexCode)
modelValue.value = false
}
const handleAction = async (e) => {
if (e == STOP) {

View File

@@ -87,7 +87,7 @@
import trafficJam from './traffic-jam'
import { getPreviewUrlApi } from '@/api/home'
import { useMap } from '@/hooks/map'
import pubSub from 'pubsub-js'
import { getRouterListApi, getRoutersApi,getRoutersMapApi } from '@/api/traffic'
import mapIcon from '@/assets/images/map-video.png'
const { map, initMap,addMarker,marker } = useMap()
@@ -145,7 +145,12 @@
immediate: true
}
)
const onVideoCollect = () => {
pubSub.subscribe('videoCollect', () => {
// clearHlsRefs()
getRoutersMap()
})
}
const getPreviewUrl = async (code) => {
let res = await getPreviewUrlApi({
cameraIndexCode: code,
@@ -184,6 +189,7 @@
getRouterList()
getRouters()
getRoutersMap()
onVideoCollect()
})
</script>