类型:开发

描述:
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) { export function getPreviewUrlApi(data) {
if(data.cameraIndexCode==undefined || !data.cameraIndexCode){
return null;
}
return request({ return request({
url: '/fjtcc-api/api/largeScreen/video/getPreviewUrl', url: '/fjtcc-api/api/largeScreen/video/getPreviewUrl',
method: 'post', method: 'post',

View File

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

View File

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