diff --git a/src/renderer/src/views/system/switch/index.vue b/src/renderer/src/views/system/switch/index.vue index 82ce365..bbd8723 100644 --- a/src/renderer/src/views/system/switch/index.vue +++ b/src/renderer/src/views/system/switch/index.vue @@ -283,10 +283,38 @@
- - - - + + + + + + + + + + + +   {{ item.time }}     {{ item.msg }} @@ -400,6 +428,19 @@ const gatewayRules = reactive({ publishTopic: [{ required: true, message: '下行主题不能为空', trigger: 'blur' }] }); +// window.api.readDirectory('../../resources/config/write/').then((flieList=>{ +// console.log("测试请求",flieList) +// if(flieList){ +// flieList.map(item=>{ +// window.api.readFile('../../resources/config/write/'+item).then(data=>{ +// console.log("window.api.read('../../resources/config/write/'+item)",data) +// }) +// }) +// }else{ +// } +// })) + + // 设备属性 let attrList = ref([ { @@ -1029,7 +1070,7 @@ const clearLog = () => { const getSocketMeassage = message => { let msg = JSON.parse(message.data); if (msg.msgType !== undefined) { - if (logList.value.length > 200) { + if (logList.value.length > 400) { logList.value.shift(); } logList.value.push({ @@ -1038,7 +1079,7 @@ const getSocketMeassage = message => { type: msg.msgType }); } else { - if (logList.value.length > 200) { + if (logList.value.length > 400) { logList.value.shift(); } logList.value.push({ @@ -1127,8 +1168,12 @@ onMounted(() => { onUnmounted(() => { window.removeEventListener('resize', updateLogItemWidth); - webSocketStore.close(); - switchSocket.close(); + if(webSocketStore){ + webSocketStore.close(); + } + if(switchSocket.websocket){ + switchSocket.close(); + } });