From 84a66a1473c8ec673c141e2367685f6d3f135da9 Mon Sep 17 00:00:00 2001 From: 23688nl <329261658@qq.com> Date: Thu, 1 Sep 2022 11:48:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=9A=20=E5=A3=B0?= =?UTF-8?q?=E9=9F=B3=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bigScreen/v3/profile/NotificationAlarm.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/bigScreen/v3/profile/NotificationAlarm.vue b/src/views/bigScreen/v3/profile/NotificationAlarm.vue index 47639ed8..c5cf547e 100644 --- a/src/views/bigScreen/v3/profile/NotificationAlarm.vue +++ b/src/views/bigScreen/v3/profile/NotificationAlarm.vue @@ -6,8 +6,8 @@ autoplay src="/images/alarm_tips.mp3" ref="audio" + v-if="audioHidden" > - ws 告警通知
报警提醒 @@ -69,6 +69,7 @@ export default { socket_flag: true, timeout_flag: null, dialogShow: false, + audioHidden: false, interval: null, intervalTime: 10, alarmInfo: { @@ -80,10 +81,11 @@ export default { }, watch: {}, created() { - setTimeout(this.handleTextSend, 10000); + setTimeout(this.handleTextSend, 5000); }, methods: { handleTextSend() { + console.log('handleTextSend-') this.dialogShow = true; this.handlePlayAudio(); }, @@ -98,12 +100,15 @@ export default { if(this.interval) { clearInterval(this.interval) }; + this.audioHidden = false; + setTimeout(this.handleTextSend, 5000); }; }, // 告警 方法 触发情况 handlePlayAudio() { - this.$refs.audio.currentTime = 0; //从头开始播放提示音 - this.$refs.audio.play(); //播放 + // this.$refs.audio.currentTime = 0; //从头开始播放提示音 + // this.$refs.audio.play(); //播放 + this.audioHidden = true; if (this.interval) { clearInterval(this.interval); }