From ff286361ce46d120699fe8a28f362ba3a47ab8dc Mon Sep 17 00:00:00 2001 From: haha Date: Sat, 23 Mar 2024 22:50:36 +0800 Subject: [PATCH] update code --- src/pages/projectVideo.vue | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/pages/projectVideo.vue b/src/pages/projectVideo.vue index 2337fae..61e2729 100644 --- a/src/pages/projectVideo.vue +++ b/src/pages/projectVideo.vue @@ -307,6 +307,7 @@ export default { }; }, mounted() { + window.xapp=this; this.$bus.$on( "projectChange", debounce((res) => { @@ -1542,20 +1543,21 @@ export default { //查询视频通道 initVideo(videoDvrNumber, url) { let that = this; - that.players = []; - let parentVM = { - vd01Flag: false, - vd02Flag: false, - vd03Flag: false, - vd04Flag: false, - }; - that.parentVM = parentVM; + that.players = []; + that.parentVM.vd01Flag=false; + that.parentVM.vd02Flag=false; + that.parentVM.vd03Flag=false; + that.parentVM.vd04Flag=false; + this.$api.video.getVideoPassage(videoDvrNumber).then((response) => { let data = response.data; this.videoPassageList = data; that.showVideo = true; - let parentVM = { vd01Flag: true, vd02Flag: true, vd03Flag: true, vd04Flag: true }; - that.parentVM = parentVM; + that.parentVM.vd01Flag=true; + that.parentVM.vd02Flag=true; + that.parentVM.vd03Flag=true; + that.parentVM.vd04Flag=true; + setTimeout(()=>{ data.forEach((it, idx) => { let player = new WasmPlayer(null, "vd0" + (idx+1), null, { Height: true, @@ -1602,6 +1604,7 @@ export default { that.players[3].play(that.url3, 1); } }); + },400); }); }, handleOnError0(error) {