修改报警请求间隔

master
夜笙歌 2 years ago
parent 6ac8e99b93
commit 40b67a09ca

@ -111,9 +111,9 @@
</el-footer>
</el-container>
<el-aside
style="background-color: rgba(0,0,0,0.3);overflow: hidden;margin-bottom: 0;height: calc(100vh - 84px);;padding:12px 0 "
style="background-color: rgba(0,0,0,0.3);overflow-y: auto;overflow-x: hidden;margin-bottom: 0;height: calc(100vh - 84px);;padding:12px 0 "
width="350px">
<div ref="warningRefP" style="height:100%;padding:0 24px">i
<div ref="warningRefP" style="height:100%;padding:0 24px">
<TransitionGroup class="container" name="fade" tag="div">
<div v-for="(i,index) in warringList" :key='i' ref="warningRef"
style="position:relative;color:#fff;height: 120px;">
@ -223,40 +223,33 @@ export default {
this.warringList = []
let i = 1
let timeout = null
let first = false
let timeoutF = () => {
timeout = setInterval(() => {
if (i >= listLength) {
first = true
clearInterval(timeout)
}
if (this.warringWaitList.length > 0) {
this.warringList.splice(this.warringList.length, 0, this.warringWaitList.splice(0, 1)[0])
}
i++
}, 1000)
}
timeoutF()
let first = true
this.warringList = this.warringWaitList
// let timeoutF = () => {
// timeout = setInterval(() => {
// if (i >= listLength) {
// first = true
// clearInterval(timeout)
// }
// if (this.warringWaitList.length > 0) {
// this.warringList.splice(this.warringList.length, 0, this.warringWaitList.splice(0, 1)[0])
// }
// i++
// }, 1000)
// }
// timeoutF()
setInterval(() => {
console.log(1)
if (first && this.warringWaitList.length > 0) {
if (this.warringList.length >= listLength) {
this.warringList.splice(0, 1)
}
let lastData = this.warringList.splice(0, 1)
setTimeout(()=>{
this.warringList.splice(this.warringList.length, 0, this.warringWaitList.splice(0, 1)[0])
}, 500)
this.warringList.splice(this.warringList.length, 0, lastData[0] || this.warringWaitList.splice(0, 1)[0])
},200)
}
}, 1000)
// console.log(this.warringList)
// console.log(domList.at(-1))
// domParent.scrollTop += 100
}, 2000)
})
setInterval(() => {
this.setInfo()
}, 10 * 1000)
}, 60 * 1000)
// })
},
beforeDestroy() {

Loading…
Cancel
Save