From 2aee4b281df8c99053d997b0fa0a879f79f9b233 Mon Sep 17 00:00:00 2001 From: guanj Date: Wed, 20 Aug 2025 20:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E6=AD=A3=E5=BC=8F=E6=A3=80?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/check/interface/index.ts | 1 + frontend/src/stores/modules/check.ts | 5 + frontend/src/utils/webSocketClient.ts | 3 +- .../views/home/components/comparePreTest.vue | 1 - .../src/views/home/components/compareTest.vue | 1306 ++++++++--------- .../home/components/compareTestPopup.vue | 865 ++++++----- .../home/components/deviceConnectionPopup.vue | 711 ++++----- 7 files changed, 1461 insertions(+), 1431 deletions(-) diff --git a/frontend/src/api/check/interface/index.ts b/frontend/src/api/check/interface/index.ts index 1e87c74..da4309a 100644 --- a/frontend/src/api/check/interface/index.ts +++ b/frontend/src/api/check/interface/index.ts @@ -103,6 +103,7 @@ export namespace CheckData { devCurr: number; //设备电流 factorFlag: number; //是否支持系数校准 checkResult:number; //检测结果 + chnNumList: object[]; //连线存储数据 } // 用来描述检测脚本类型 diff --git a/frontend/src/stores/modules/check.ts b/frontend/src/stores/modules/check.ts index a10c1a0..02e89ed 100644 --- a/frontend/src/stores/modules/check.ts +++ b/frontend/src/stores/modules/check.ts @@ -14,6 +14,7 @@ export const useCheckStore = defineStore(CHECK_STORE_KEY, { showDetailType: 0, // 0:数据查询 1:误差体系跟换 2:正式检测 temperature: 0, humidity: 0, + chnNumList: [],//连线数据 }), getters: {}, actions: { @@ -37,6 +38,7 @@ export const useCheckStore = defineStore(CHECK_STORE_KEY, { this.selectTestItems.test = true }, setSelectTestItems(selectTestItems: CheckData.SelectTestItem) { + console.log("🚀 ~ setSelectTestItems ~ selectTestItems:", selectTestItems) this.selectTestItems = selectTestItems }, setCheckType(checkType: number) { @@ -54,6 +56,9 @@ export const useCheckStore = defineStore(CHECK_STORE_KEY, { setHumidity(humidity: number) { this.humidity = humidity }, + setChnNum(chnNumList: string[]) { + this.chnNumList = chnNumList + }, } }); \ No newline at end of file diff --git a/frontend/src/utils/webSocketClient.ts b/frontend/src/utils/webSocketClient.ts index 8d115e6..bf323b0 100644 --- a/frontend/src/utils/webSocketClient.ts +++ b/frontend/src/utils/webSocketClient.ts @@ -190,7 +190,8 @@ export default class SocketService { * WebSocket连接配置 */ private config: SocketConfig = { - url: 'ws://127.0.0.1:7777/hello', + // url: 'ws://127.0.0.1:7777/hello', + url: 'ws://192.168.1.124:7777/hello', heartbeatInterval: 9000, // 9秒心跳间隔 reconnectDelay: 5000, // 5秒重连延迟 maxReconnectAttempts: 5, // 最多重连5次 diff --git a/frontend/src/views/home/components/comparePreTest.vue b/frontend/src/views/home/components/comparePreTest.vue index c6ed0fd..c455c62 100644 --- a/frontend/src/views/home/components/comparePreTest.vue +++ b/frontend/src/views/home/components/comparePreTest.vue @@ -201,7 +201,6 @@ interface DeviceData { const testDataStructure = ref>({}); watch(webMsgSend, function (newValue, oldValue) { - console.log('webMsgSend', newValue) if (testStatus.value !== 'waiting') { if(newValue.code == 25004){ ElMessage.error('接收数据超时!') diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue index f5164df..9f28ab7 100644 --- a/frontend/src/views/home/components/compareTest.vue +++ b/frontend/src/views/home/components/compareTest.vue @@ -1,93 +1,135 @@ diff --git a/frontend/src/views/home/components/compareTestPopup.vue b/frontend/src/views/home/components/compareTestPopup.vue index 4f800f8..70eb0fa 100644 --- a/frontend/src/views/home/components/compareTestPopup.vue +++ b/frontend/src/views/home/components/compareTestPopup.vue @@ -1,141 +1,207 @@ \ No newline at end of file + diff --git a/frontend/src/views/home/components/deviceConnectionPopup.vue b/frontend/src/views/home/components/deviceConnectionPopup.vue index 027e57d..14d09db 100644 --- a/frontend/src/views/home/components/deviceConnectionPopup.vue +++ b/frontend/src/views/home/components/deviceConnectionPopup.vue @@ -1,63 +1,63 @@