diff --git a/src/views/kitchen/environment/videoMonitoring/history.vue b/src/views/kitchen/environment/videoMonitoring/history.vue index 2f1bea11..9eacb096 100644 --- a/src/views/kitchen/environment/videoMonitoring/history.vue +++ b/src/views/kitchen/environment/videoMonitoring/history.vue @@ -108,18 +108,16 @@ methods:{ cbInitPluginComplete: function () { oWebVideoCtrl2.I_InsertOBJECTPlugin("divPlugin"); oWebVideoCtrl2.I_Login(oLiveView.szIP,oLiveView.iProtocol, oLiveView.szPort, oLiveView.szUsername, oLiveView.szPassword, { - success: function (xmlDoc) { - setTimeout(function () { - 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 - }); - }, 500); + 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 + }); } }); } @@ -153,10 +151,8 @@ methods:{ async handleNodeClick2(data) { if(data.deviceExtendInfo&&data.deviceExtendInfo!=""){ let obj = JSON.parse(data.deviceExtendInfo) - this.chosenChannel2 = 15 - setTimeout(() => { - this.iframeLoaded2() - }, 500); + this.chosenChannel2 = 15 + this.iframeLoaded2() }else{ this.$modal.msgError("设备未绑定通道号"); } diff --git a/src/views/kitchen/environment/videoMonitoring/index.vue b/src/views/kitchen/environment/videoMonitoring/index.vue index 04f1bdca..3b4b81b1 100644 --- a/src/views/kitchen/environment/videoMonitoring/index.vue +++ b/src/views/kitchen/environment/videoMonitoring/index.vue @@ -84,8 +84,7 @@ methods:{ cbInitPluginComplete: function () { oWebVideoCtrl1.I_InsertOBJECTPlugin("divPlugin"); oWebVideoCtrl1.I_Login(oLiveView.szIP,oLiveView.iProtocol, oLiveView.szPort, oLiveView.szUsername, oLiveView.szPassword, { - success: function (xmlDoc) { - setTimeout(function () { + success: function (xmlDoc) { oWebVideoCtrl1.I_StartRealPlay(szDeviceIdentify, { iRtspPort: oLiveView.szPort, iWndIndex:0, @@ -113,8 +112,7 @@ methods:{ iStreamType: oLiveView.iStreamType, iChannelID: 22, bZeroChannel: oLiveView.bZeroChannel - }); - }, 500); + }); } }); }, @@ -152,10 +150,8 @@ methods:{ async handleNodeClick(data) { if(data.deviceExtendInfo&&data.deviceExtendInfo!=""){ let obj = JSON.parse(data.deviceExtendInfo) - this.chosenChannel = 15 - setTimeout(() => { - this.iframeLoaded(this.chosenWinNo,this.chosenChannel) - }, 500); + this.chosenChannel = 15 + this.iframeLoaded(this.chosenWinNo,this.chosenChannel) }else{ this.$modal.msgError("设备未绑定通道号"); } @@ -173,9 +169,7 @@ methods:{ } var szDeviceIdentify = oLiveView.szIP; var oWebVideoCtrl1 = this.$refs.videoIframe1.contentWindow.WebVideoCtrl; - oWebVideoCtrl1.I_Stop({ - iWndIndex:WinNo - }) + oWebVideoCtrl1.I_Stop({ iWndIndex:WinNo }) setTimeout(function () { oWebVideoCtrl1.I_StartRealPlay(szDeviceIdentify, { iRtspPort: oLiveView.szPort, @@ -184,7 +178,7 @@ methods:{ iChannelID: Channel, bZeroChannel: oLiveView.bZeroChannel }); - }, 800); + }, 500); }, }