From 076d84bd0a025c0b4208238be7ca08874839e83e Mon Sep 17 00:00:00 2001 From: guoyue Date: Mon, 26 Sep 2022 16:29:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A5=BF=E6=B5=B7=E5=B2=B8=EF=BC=9A=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=92=AD=E6=94=BE=20=E7=A6=BB=E7=BA=BF(status?= =?UTF-8?q?=E4=B8=8D=E6=98=AF1)=E6=8F=90=E7=A4=BA=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=A6=BB=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/infrastructurePage.vue | 35 ++++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index 766b2115..fd378fe1 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -315,7 +315,7 @@ openVideo( record.channelCode || record.channelId || - record.channelCode.channelId + record.channelCode.channelId, record ) "> 预览 @@ -389,9 +389,9 @@ destroyOnClose @cancel="videoClean">
-
+
-
+

@@ -465,7 +465,7 @@ const current = ref(1) const videoTotal = ref(0) const router = useRouter() const whoShow1 = ref(whoShow) -const isXiHaiAn = whoShow1.value.itShowXiHaiAn; +const isXiHaiAn = whoShow1.value.itShowXiHaiAn || true; const options = reactive({ width: '912px', //播放器宽度 height: '513px', //播放器高度 @@ -688,8 +688,11 @@ if (whoShow1.value.itShowXiHaiAn) { tabList.value[0].content.push('无人机') tabList.value[0].content.push('单兵设备') } + +const rowClickData = ref(null) // 打开视频预览 -const openVideo = (id) => { +const openVideo = (id, record) => { + rowClickData.value = record; console.log('打开视频', id) const param = { key: id, @@ -1271,8 +1274,6 @@ const getSoldierData = (indexFather, name) => { return message.error(res.data.msg) } let { list = [], total = 0 } = res.data.data; - console.log('total------------>', total); - pagination.value.total = total if (name == '无人机') { list.map((wrj) => { @@ -1285,6 +1286,7 @@ const getSoldierData = (indexFather, name) => { }) }) } + if (name == '单兵设备') { list.map((db) => { dataSource2.value.push({ @@ -1348,7 +1350,7 @@ const batchPreview = async function (page) { }, } await getStreamByChannelCode(param).then((res) => { - // 视频测试 + // 视频测试-勿删 // ob.options.src = 'http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8' ob.options.src = res.data.data console.log('监测ob的变化', ob) @@ -1489,7 +1491,6 @@ const getCamera = (flag, str) => { longitude: mapSearchParam.value.gpsX || '', latitude: mapSearchParam.value.gpsY || '', radius: mapSearchParam.value.radius || '', - status: 1, name: mapSearchParam.value.cameraName } // todo-临时放开 @@ -1658,8 +1659,19 @@ const handleTableChange = (val) => { } } -const videoShowMsg = () => { - message.warning('请申请后在我的申请中预览视频!') +// 视频预览 提示 +const videoShowMsg = (index) => { + let itemData = null; + if (index) { + itemData = selectedList.value[index] + } + let msg = '请申请后在我的申请中预览视频!' + if ((itemData && itemData.status !== 1) || (rowClickData.value && rowClickData.value.status !== 1)) { + msg = '当前视频离线不可预览!' + } else { + msg = '请申请后在我的申请中预览视频!' + } + message.warning(msg) }