From 26325c46b05371857620f218cfaba3121d7cec16 Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Tue, 2 Dec 2025 11:24:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/App.vue b/src/App.vue index 15ece4f..d8d4f83 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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,