diff --git a/.gitignore b/.gitignore index f3a219d..dac037e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ out .DS_Store *.log* /dist/ +/dist.zip diff --git a/electron-builder.yml b/electron-builder.yml index 93daa21..6345bfc 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -62,6 +62,12 @@ npmRebuild: false publish: provider: generic # 更新服务提供者 url: https://example.com/auto-updates # 更新信息的URL +# provider: github # 更新服务提供者 +# owner: fanhuayishiy # GitHub用户名 +# repo: mygit1 # GitHub仓库名称 +# token: ${env:GITHUB_TOKEN} +# releaseType: release + # 配置Electron下载的镜像地址 electronDownload: mirror: https://npmmirror.com/mirrors/electron/ # Electron下载的镜像地址 diff --git a/package.json b/package.json index 6ea79e5..adc853d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gateway-app", - "version": "1.0.0", + "version": "1.0.3", "description": "An Electron application with Vue", "main": "./out/main/index.js", "author": "example.com", diff --git a/resources/service/plugins/gateway.exe b/resources/service/plugins/gateway.exe index e5604d4..882fd7e 100644 Binary files a/resources/service/plugins/gateway.exe and b/resources/service/plugins/gateway.exe differ diff --git a/src/main/index.js b/src/main/index.js index 1524904..2f3ff69 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -40,8 +40,11 @@ function createWindow() { devTools: true } }); - //开启调试 - // mainWindow.webContents.openDevTools() + //开发模式 开启调试 + if (is.dev) { + mainWindow.webContents.openDevTools(); + } + mainWindow.on('ready-to-show', () => { mainWindow.show(); }); diff --git a/src/renderer/src/views/system/switch/index.vue b/src/renderer/src/views/system/switch/index.vue index e8e4bc0..b5eda2d 100644 --- a/src/renderer/src/views/system/switch/index.vue +++ b/src/renderer/src/views/system/switch/index.vue @@ -207,7 +207,12 @@
-
日志
+
+
日志
+ +
mqtt状态:
@@ -262,7 +267,7 @@
-
+
@@ -292,6 +297,7 @@ const webSocketStore = logWebSocketStore(); const activeFold = ref(['1', '3', '4', '5']); const logList = ref([]); +const logSearch = ref(''); const logItemWidth = ref('auto'); //连接状态 const connectionState = ref(false); @@ -319,7 +325,7 @@ const mqttFormRef = ref(); // passWord: '', // }) const mqttForm = reactive({ - clientId: 'mqtt_local', + clientId: getGuid(), host: '123.60.30.87', port: '8017', path: '', @@ -643,7 +649,7 @@ const runMqtt = formEl => { formEl.validate(valid => { if (valid) { axios - .get(config.url + '/mqtt/conn', { + .get(config.url + '/mqtt/conn', { // 发起GET请求 params: mqttForm }) @@ -1031,6 +1037,18 @@ const switchSocketStatus = computed(() => { return switchSocket.socket_open; }); +const searchLogList = computed(() => { + if (!logSearch.value) { + return logList.value + }else{ + return logList.value.filter(item => { + return JSON.stringify(item.msg).includes(logSearch.value) + }) + } +}) + + + // 生命周期钩子 onMounted(() => { initSocket(); @@ -1093,7 +1111,16 @@ 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-operate { display: flex; align-items: center; @@ -1177,6 +1204,10 @@ onUnmounted(() => { } } + :deep(.log-box-search .el-input__wrapper) { + background: #fff; + } + .btn-box { :deep(.el-form-item__content) { justify-content: end;