类型:开发

描述:
This commit is contained in:
2026-01-23 00:23:43 +08:00
parent fab9537aad
commit e4f42a7136
3 changed files with 34 additions and 31 deletions

View File

@@ -50,6 +50,9 @@ export function getRegionsListApi(data){
// 获取视频播放地址
export function getPreviewUrlApi(data) {
if(data.cameraIndexCode==undefined || !data.cameraIndexCode){
return null;
}
return request({
url: '/fjtcc-api/api/largeScreen/video/getPreviewUrl',
method: 'post',

View File

@@ -253,17 +253,17 @@
const showTrafficEvent = function(){
trafficEventShow.value = true;
}
window.addEventListener("message", async(e) => {
let {code,data} = await getPreviewUrlApi({
type: 'hls',
cameraIndexCode:e.data.cameraIndexCode
})
if(code===200){
src.value = data.url
cameraIndexCode.value = e.data.cameraIndexCode
videoShow.value = true
}
});
// window.addEventListener("message", async(e) => {
// let {code,data} = await getPreviewUrlApi({
// type: 'hls',
// cameraIndexCode:e.data.cameraIndexCode
// })
// if(code===200){
// src.value = data.url
// cameraIndexCode.value = e.data.cameraIndexCode
// videoShow.value = true
// }
// });
// 异常告警
let abnormalAlarm = computed(() => {
return [{ data: abnormalData.value.abnormalAlarm.map((item) => item.value) }]

View File

@@ -237,17 +237,17 @@ import pubSub from 'pubsub-js'
let src = ref('')
let cameraIndexCode = ref('')
let videoShow = ref(false)
window.addEventListener("message", async(e) => {
let {code,data} = await getPreviewUrlApi({
type: 'hls',
cameraIndexCode:e.data.cameraIndexCode
})
if(code===200){
src.value = data.url
cameraIndexCode.value = e.data.cameraIndexCode
videoShow.value = true
}
});
// window.addEventListener("message", async(e) => {
// let {code,data} = await getPreviewUrlApi({
// type: 'hls',
// cameraIndexCode:e.data.cameraIndexCode
// })
// if(code===200){
// src.value = data.url
// cameraIndexCode.value = e.data.cameraIndexCode
// videoShow.value = true
// }
// });
let dialogTableVisible = ref(false)
let gridData = ref([])
let gridTitle = ref('')