From 4dc711bc045496f1a714d9ecca880e66497a87bd Mon Sep 17 00:00:00 2001 From: yxt_djz Date: Wed, 11 Jan 2023 09:22:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=90=A4=E7=9F=B3=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supervise/monitoringCenter/index.vue | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/base-ui/src/views/supervise/monitoringCenter/index.vue b/base-ui/src/views/supervise/monitoringCenter/index.vue index 2196ff9d..861fe947 100644 --- a/base-ui/src/views/supervise/monitoringCenter/index.vue +++ b/base-ui/src/views/supervise/monitoringCenter/index.vue @@ -4,7 +4,7 @@
- {{ play ? '正在播放' : '停止' }} + {{ play ? '播放' : '停止' }} @@ -34,7 +34,7 @@ token: '', player: null, enableZ:false, //默认关闭电子放大 - play: false //默认停止播放 + play: true //默认停止播放 } }, created(){ @@ -48,7 +48,7 @@ url: 'ezopen://open.ys7.com/109860978/1.hd.live', audio: 1, // 是否默认开启声音 0 - 关闭 1 - 开启 autoplay: true, - templete: "security", + templete: "simple", header: ["capturePicture"], footer: ['talk','fullScreen'], width: 608, @@ -80,28 +80,34 @@ },*/ // 播放/停止 监控 togglePlay(){ - if(!this.player) return; + // if(!this.player || !this.play) return; switch (this.play) { - case true: - this.player.stop(); - this.play = false; - break; case false: this.player.play(); this.play = true; break; + case true: + this.player.stop(); + this.play = false; + break; default: break; } }, // 视频截图 isCapturePicture(){ - if(!this.player || !this.play) return; + if(!this.player || !this.play) { + this.$message({ showClose: true, type: 'error', message: '视频停止播放不能截图' }); + return; + } this.player.capturePicture(); }, // 全屏 isFullScreen(){ - if(!this.player || !this.play) return; + if(!this.player || !this.play) { + this.$message({ showClose: true, type: 'error', message: '视频停止播放不能全屏' }); + return; + } this.player.fullScreen(); }