From b1fc8417cd8c930140ca0f34b350e7951c150474 Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Thu, 10 Jul 2025 15:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9B=91=E6=8E=A7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B7=BB=E5=8A=A0=E5=8F=B3=E5=87=BB=E5=85=A8=E5=B1=8F?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/monitor/iframe.html | 46 +++++++++++++++++++ .../environment/videoMonitoring/history.vue | 22 +++++---- .../environment/videoMonitoring/index.vue | 7 ++- 3 files changed, 61 insertions(+), 14 deletions(-) diff --git a/public/monitor/iframe.html b/public/monitor/iframe.html index ea9875e0..6975780e 100644 --- a/public/monitor/iframe.html +++ b/public/monitor/iframe.html @@ -13,14 +13,33 @@ html, body { padding: 0; border: 0; overflow: hidden; + position: relative; } .plugin { width: 1300px; height: 680px; } +.vpopmenu{ + position: absolute; + background: #666; + color: #fff; + top:0; + left: 0; + width: 100px; + height: 40px; + text-align: center; + line-height: 40px; + display: none; + +}
+ +
+ +
全屏
+
@@ -32,6 +51,33 @@ html, body { // var urlParams = new URLSearchParams(window.location.search); // var type = urlParams.get('type'); // console.log(type) +$(function () { +bindMenu(); + const menu = document.getElementById("r_menu"); + function bindMenu(){ + //给所有class=plugin的div都加上右键菜单 + let $BIPanel = $("div[class='plugin']").contextmenu(function(ev) { + let oEvent = ev || event; + //自定义的菜单显示 + menu.style.display = "block"; + //让自定义菜单随鼠标的箭头位置移动 + menu.style.left = oEvent.clientX + "px"; + menu.style.top = oEvent.clientY + "px"; + //return false阻止系统自带的菜单, + //return false必须写在最后,否则自定义的右键菜单也不会出现 + return false; + }); + } + + + //实现点击document,自定义菜单消失 + document.onclick = function() { + menu.style.display = "none"; + } +}); +function clickFullScreen(){ + WebVideoCtrl.I_FullScreen(true); +} // $(function () { // var height = '350'; // var width = $("body").width(); diff --git a/src/views/kitchen/environment/videoMonitoring/history.vue b/src/views/kitchen/environment/videoMonitoring/history.vue index 7d6b9c3d..01b9d0be 100644 --- a/src/views/kitchen/environment/videoMonitoring/history.vue +++ b/src/views/kitchen/environment/videoMonitoring/history.vue @@ -109,15 +109,17 @@ methods:{ oWebVideoCtrl2.I_InsertOBJECTPlugin("divPlugin"); oWebVideoCtrl2.I_Login(oLiveView.szIP,oLiveView.iProtocol, oLiveView.szPort, oLiveView.szUsername, oLiveView.szPassword, { success: function (xmlDoc) { - // console.log(that.formatDateTime(that.dateRange[0])) - // console.log(that.formatDateTime(that.dateRange[1])) - // oWebVideoCtrl2.I_StartPlayback(szDeviceIdentify, { - // szStartTime:that.formatDateTime(that.dateRange[0]), - // szEndTime:that.formatDateTime(that.dateRange[1]), - // iChannelID: that.chosenChannel2, - // iStreamType: oLiveView.iStreamType, - // bZeroChannel: oLiveView.bZeroChannel - // }); + console.log(that.formatDateTime(that.dateRange[0])) + console.log(that.formatDateTime(that.dateRange[1])) + setTimeout(function () { + oWebVideoCtrl2.I_StartPlayback(szDeviceIdentify, { + szStartTime:that.formatDateTime(that.dateRange[0]), + szEndTime:that.formatDateTime(that.dateRange[1]), + iChannelID: that.chosenChannel2, + iStreamType: oLiveView.iStreamType, + bZeroChannel: oLiveView.bZeroChannel + }); + }, 1000); } }); } @@ -182,7 +184,7 @@ methods:{ iStreamType: oLiveView.iStreamType, bZeroChannel: oLiveView.bZeroChannel }); - }, 800); + }, 1000); }, defaultDateRange() { const end = new Date(new Date().toLocaleDateString()); diff --git a/src/views/kitchen/environment/videoMonitoring/index.vue b/src/views/kitchen/environment/videoMonitoring/index.vue index 439dfa61..916cfbff 100644 --- a/src/views/kitchen/environment/videoMonitoring/index.vue +++ b/src/views/kitchen/environment/videoMonitoring/index.vue @@ -160,7 +160,7 @@ methods:{ async handleNodeClick(data) { if(data.deviceExtendInfo&&data.deviceExtendInfo!=""){ let obj = JSON.parse(data.deviceExtendInfo) - this.chosenChannel = 18; + this.chosenChannel = 22; this.iframeLoaded(this.chosenWinNo,this.chosenChannel) }else{ this.$modal.msgError("设备未绑定通道号"); @@ -188,9 +188,8 @@ methods:{ iChannelID: Channel, bZeroChannel: oLiveView.bZeroChannel }); - }, 500); - }, - + }, 1000); + }, } }