fix: 修改告警文件配置
This commit is contained in:
@@ -113,7 +113,6 @@ import { mapActions } from 'vuex'
|
|||||||
import guide from '@/components/common/popBox/guide'
|
import guide from '@/components/common/popBox/guide'
|
||||||
import intro from '@/components/common/intro'
|
import intro from '@/components/common/intro'
|
||||||
import imageUrl from '@/assets/img/system-sound-settings.gif'
|
import imageUrl from '@/assets/img/system-sound-settings.gif'
|
||||||
import audioUrl from '@/assets/audio/new_alert_message.mp3'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
components: {
|
components: {
|
||||||
@@ -198,7 +197,7 @@ export default {
|
|||||||
...mapActions(['logoutSuccess']),
|
...mapActions(['logoutSuccess']),
|
||||||
// 测试是否能自动播放 若不能 点击开关时弹窗
|
// 测试是否能自动播放 若不能 点击开关时弹窗
|
||||||
testAutoplay () {
|
testAutoplay () {
|
||||||
const audio = new Audio(audioUrl)
|
const audio = new Audio('/static/audio/new_alert_message.mp3')
|
||||||
audio.muted = true
|
audio.muted = true
|
||||||
audio.play().then(() => {
|
audio.play().then(() => {
|
||||||
console.log('autoplay')
|
console.log('autoplay')
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import moment from 'moment-timezone'
|
|||||||
import { get } from '../http'
|
import { get } from '../http'
|
||||||
import store from '../store'
|
import store from '../store'
|
||||||
import router from '../router'
|
import router from '../router'
|
||||||
import audioUrl from '@/assets/audio/new_alert_message.mp3'
|
|
||||||
Date.prototype.setStart = function () {
|
Date.prototype.setStart = function () {
|
||||||
this.setHours(0)
|
this.setHours(0)
|
||||||
this.setMinutes(0)
|
this.setMinutes(0)
|
||||||
@@ -379,7 +378,7 @@ export default new Vue({
|
|||||||
}
|
}
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
if (!this.audio) {
|
if (!this.audio) {
|
||||||
this.audio = new Audio(audioUrl)
|
this.audio = new Audio('/static/audio/new_alert_message.mp3')
|
||||||
}
|
}
|
||||||
if (response.data.list && response.data.list.length) {
|
if (response.data.list && response.data.list.length) {
|
||||||
this.lastId = response.data.list.reduce(function (max, obj) {
|
this.lastId = response.data.list.reduce(function (max, obj) {
|
||||||
@@ -422,7 +421,7 @@ export default new Vue({
|
|||||||
}, 10 * index)
|
}, 10 * index)
|
||||||
})
|
})
|
||||||
let playCount = 0
|
let playCount = 0
|
||||||
const audioLoop = store.state.nzDefaultConfig.audioLoop || 3
|
const audioLoop = store.state.nzDefaultConfig.audioLoop || 1
|
||||||
const maxPlayCount = parseInt(audioLoop) // 设置希望播放的次数
|
const maxPlayCount = parseInt(audioLoop) // 设置希望播放的次数
|
||||||
if (maxPlayCount) {
|
if (maxPlayCount) {
|
||||||
this.audio.play()
|
this.audio.play()
|
||||||
|
|||||||
Reference in New Issue
Block a user