|
|
|
|
@ -366,11 +366,21 @@ export default {
|
|
|
|
|
this.isWebSocketConnected = false
|
|
|
|
|
this.isProcessingAlarm = false
|
|
|
|
|
},
|
|
|
|
|
saveLo(e) {
|
|
|
|
|
let localStorageData = localStorage.getItem('ERROR')
|
|
|
|
|
let data = {}
|
|
|
|
|
if (localStorageData) {
|
|
|
|
|
data = JSON.parse(localStorageData)
|
|
|
|
|
}
|
|
|
|
|
data.push(e)
|
|
|
|
|
localStorage.setItem('ERROR', JSON.stringify(data))
|
|
|
|
|
},
|
|
|
|
|
selectOffLineDevice() {
|
|
|
|
|
Object.keys(this.isOnline).forEach(key => {
|
|
|
|
|
// console.log(key, new Date().getTime() - this.isOnline[key])
|
|
|
|
|
if (new Date().getTime() - this.isOnline[key] > (1000 * 60 * 60)) {
|
|
|
|
|
console.log('error', key)
|
|
|
|
|
this.saveLo(key)
|
|
|
|
|
this.$confirm(`设备${key}已离线`, '设备离线', {
|
|
|
|
|
cancelButtonText: '关闭',
|
|
|
|
|
showConfirmButton: false,
|
|
|
|
|
|