更新报警声
This commit is contained in:
parent
5a537dd66e
commit
3d2e1d95e5
BIN
src/views/modules/alarm.mp3
Normal file
BIN
src/views/modules/alarm.mp3
Normal file
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-01-04 10:29:40
|
* @Date: 2023-01-04 10:29:40
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2023-08-09 09:54:14
|
* @LastEditTime: 2023-08-14 09:20:13
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -10,6 +10,9 @@
|
|||||||
<div id="alertOverlay" :class="{ alertOverlay: showAlarm }">
|
<div id="alertOverlay" :class="{ alertOverlay: showAlarm }">
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
|
<audio controls hidden ref="audio" loop>
|
||||||
|
<source src="./alarm.mp3" />
|
||||||
|
</audio>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img style="height: 52px;float:left;margin:12px 24px" src="~@/assets/img/横版logo.png" />
|
<img style="height: 52px;float:left;margin:12px 24px" src="~@/assets/img/横版logo.png" />
|
||||||
<img
|
<img
|
||||||
@ -185,9 +188,15 @@ export default {
|
|||||||
this.tableData = JSON.parse(JSON.stringify(dataJson)).alarm;
|
this.tableData = JSON.parse(JSON.stringify(dataJson)).alarm;
|
||||||
if (this.tableData.length > 0 && this.tableData.find((i) => i.type !== "RGV1提示")) {
|
if (this.tableData.length > 0 && this.tableData.find((i) => i.type !== "RGV1提示")) {
|
||||||
this.showAlarm = true;
|
this.showAlarm = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.audio.play(); //播放
|
||||||
|
});
|
||||||
this.setAlertState(true);
|
this.setAlertState(true);
|
||||||
} else {
|
} else {
|
||||||
this.showAlarm = false;
|
this.showAlarm = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.audio.pause(); //暂停
|
||||||
|
});
|
||||||
this.setAlertState(false);
|
this.setAlertState(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user