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 @@