|
|
@@ -267,15 +267,25 @@ export default {
|
|
|
// 弹出打开声音提示框
|
|
|
messageModal: function () {
|
|
|
const _self = this;
|
|
|
- Modal.warning({
|
|
|
- okText: '确认',
|
|
|
- title: '温馨提示',
|
|
|
- content: '您的浏览器设置,提示音无法自动播放,请您点击【确认】按钮,可以自动播放提示音。',
|
|
|
- onOk() {
|
|
|
+ const play = () => {
|
|
|
+ let allowSound = localStorage.getItem('allowSound');
|
|
|
+ if (allowSound && allowSound == 'false') {
|
|
|
_self.playSound(false);
|
|
|
localStorage.setItem('allowSound', true);
|
|
|
- },
|
|
|
- });
|
|
|
+ }
|
|
|
+ window.removeEventListener('mousemove', play);
|
|
|
+ };
|
|
|
+ window.addEventListener('mousemove', play);
|
|
|
+
|
|
|
+ // Modal.warning({
|
|
|
+ // okText: '确认',
|
|
|
+ // title: '温馨提示',
|
|
|
+ // content: '您的浏览器设置,提示音无法自动播放,请您点击【确认】按钮,可以自动播放提示音。',
|
|
|
+ // onOk() {
|
|
|
+ // _self.playSound(false);
|
|
|
+ // localStorage.setItem('allowSound', true);
|
|
|
+ // },
|
|
|
+ // });
|
|
|
},
|
|
|
// 触发仪表盘数量更新事件
|
|
|
executionEvent: function () {
|