diff --git a/resources/service/plugins/gateway.exe b/resources/service/plugins/gateway.exe index 882fd7e..b32d81d 100644 Binary files a/resources/service/plugins/gateway.exe and b/resources/service/plugins/gateway.exe differ diff --git a/src/renderer/src/views/system/switch/index.vue b/src/renderer/src/views/system/switch/index.vue index b5eda2d..59696cb 100644 --- a/src/renderer/src/views/system/switch/index.vue +++ b/src/renderer/src/views/system/switch/index.vue @@ -208,11 +208,14 @@
-
日志
- -
+
日志
+ +
mqtt状态:
@@ -299,6 +302,27 @@ const activeFold = ref(['1', '3', '4', '5']); const logList = ref([]); const logSearch = ref(''); const logItemWidth = ref('auto'); +const logType = ref(['subscribe', 'publish', 'system', '']); +// 设备属性 +const logTypeList = [ + { + label: '订阅', + value: 'subscribe' + }, + { + label: '发布', + value: 'publish' + }, + { + label: '系统', + value: 'system' + }, + { + label: '其他', + value: '' + } +]; + //连接状态 const connectionState = ref(false); @@ -649,7 +673,7 @@ const runMqtt = formEl => { formEl.validate(valid => { if (valid) { axios - .get(config.url + '/mqtt/conn', { + .get(config.url + '/mqtt/conn', { // 发起GET请求 params: mqttForm }) @@ -1038,16 +1062,17 @@ const switchSocketStatus = computed(() => { }); const searchLogList = computed(() => { - if (!logSearch.value) { - return logList.value - }else{ - return logList.value.filter(item => { - return JSON.stringify(item.msg).includes(logSearch.value) - }) - } -}) - - + if (!logSearch.value) { + return logList.value.filter(item => { + console.log(item, logType.value.indexOf(item.type)); + return logType.value.indexOf(item.type) !== -1; + }); + } else { + return logList.value.filter(item => { + return JSON.stringify(item.msg).includes(logSearch.value) && logType.value.indexOf(item.type) !== -1; + }); + } +}); // 生命周期钩子 onMounted(() => { @@ -1111,16 +1136,15 @@ onUnmounted(() => { background: #e6e6e6; font-family: Source Han Sans CN; color: #333333; - .log-box-title{ - display: flex; - align-items: center; - .log-box-search{ - margin-left: 10px; - display: flex; - align-items: center; - - } - } + .log-box-title { + display: flex; + align-items: center; + .log-box-search { + margin-left: 10px; + display: flex; + align-items: center; + } + } .log-box-operate { display: flex; align-items: center; @@ -1204,9 +1228,13 @@ onUnmounted(() => { } } - :deep(.log-box-search .el-input__wrapper) { - background: #fff; - } + :deep(.log-box-search .el-input__wrapper) { + background: #fff; + } + + :deep(.log-box-search .el-select__wrapper) { + background: #fff; + } .btn-box { :deep(.el-form-item__content) {