From e4f42a71367cad68a73153ebe3e5bf1e52fe18e5 Mon Sep 17 00:00:00 2001 From: lixuefeng <1126141216@qq.com> Date: Fri, 23 Jan 2026 00:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B1=BB=E5=9E=8B=EF=BC=9A=E5=BC=80=E5=8F=91?= =?UTF-8?q?=20=E6=8F=8F=E8=BF=B0=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home.js | 3 +++ src/views/monitor/components/box-1.vue | 26 +++++++++---------- src/views/scenic/components/box-1.vue | 36 +++++++++++++------------- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/api/home.js b/src/api/home.js index edaed22..1747058 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -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', diff --git a/src/views/monitor/components/box-1.vue b/src/views/monitor/components/box-1.vue index 434a562..ec30f68 100644 --- a/src/views/monitor/components/box-1.vue +++ b/src/views/monitor/components/box-1.vue @@ -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) }] @@ -502,7 +502,7 @@ display: flex; align-items: center; justify-content: space-evenly; - + &-item { width: vw(339); height: vw(102); @@ -620,7 +620,7 @@ margin-bottom: vh(4); } .other-box{ - + height: vh(350) !important; } .box { diff --git a/src/views/scenic/components/box-1.vue b/src/views/scenic/components/box-1.vue index 08508fd..af3f29c 100644 --- a/src/views/scenic/components/box-1.vue +++ b/src/views/scenic/components/box-1.vue @@ -29,7 +29,7 @@ - +
@@ -74,8 +74,8 @@
- - + +