From ac90170f78cc1769b79fd676ab18feaa03d27390 Mon Sep 17 00:00:00 2001 From: betaqi <3188864257@qq.com> Date: Wed, 28 May 2025 17:10:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global.types/components.d.ts | 1 - src/api/module/transfer/index.ts | 2 +- src/stores/transferData.ts | 4 +- src/utils/zmqJsonWorker.ts | 2 +- src/views/firmwareUpload/index.vue | 16 +++++- src/views/layout/index.vue | 2 +- .../stationData/components/PointGroupTree.vue | 2 +- .../stationData/components/deviceDrawer.vue | 33 +++++++----- .../stationData/components/newDataChart.vue | 12 +++++ .../stationData/components/offTransferDlg.vue | 2 +- .../components/onLineTransferDlg.vue | 2 +- src/views/stationData/index.vue | 2 +- src/views/stationData/transferData.vue | 52 ++++++++++++++----- src/views/stationData/type.ts | 2 + 14 files changed, 96 insertions(+), 38 deletions(-) diff --git a/global.types/components.d.ts b/global.types/components.d.ts index 4328060..b6c94ef 100644 --- a/global.types/components.d.ts +++ b/global.types/components.d.ts @@ -24,7 +24,6 @@ declare module 'vue' { ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] - ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElInput: typeof import('element-plus/es')['ElInput'] ElMenu: typeof import('element-plus/es')['ElMenu'] diff --git a/src/api/module/transfer/index.ts b/src/api/module/transfer/index.ts index 5fd3f5e..d615538 100644 --- a/src/api/module/transfer/index.ts +++ b/src/api/module/transfer/index.ts @@ -22,7 +22,7 @@ export const getDeviceDetails = (params: IGetDeviceDataParams) => export interface ISite { id: string name: string - export_time: string + create_time: string last_modify_time: string export_root_path: string } diff --git a/src/stores/transferData.ts b/src/stores/transferData.ts index c8d366a..751e44c 100644 --- a/src/stores/transferData.ts +++ b/src/stores/transferData.ts @@ -35,7 +35,6 @@ export const useTransferDataStore = defineStore('transfer', () => { function getSubDevicesCb(msg: SubMsgData) { const { feedback } = msg const sn = feedback[1] - const hasDevice = devicesMap.get(sn) if (hasDevice) { hasDevice.lastUpdated = Date.now() @@ -45,7 +44,8 @@ export const useTransferDataStore = defineStore('transfer', () => { clientIp: feedback[0], sn: sn, site_id: feedback[2], - footprint: feedback[3] ?? '--', + versions: feedback[3] ?? '--', + footprint: feedback[4] ?? '--', lastUpdated: Date.now(), status: '在线', // 初始状态为在线 isChecked: false, diff --git a/src/utils/zmqJsonWorker.ts b/src/utils/zmqJsonWorker.ts index ed05537..0d63cd0 100644 --- a/src/utils/zmqJsonWorker.ts +++ b/src/utils/zmqJsonWorker.ts @@ -5,7 +5,7 @@ import { WorkerCMD, ZmqCMD, type PublishMsg, type PubMsgData, } from './zmq' const HEARTBEAT_TOPIC = 'HEARTBEAT' const HEARTBEAT_INTERVAL = 3000 const STATUS_CHECK_INTERVAL = 1000 -let messageTimeout = 10000 +let messageTimeout = 20000 let heartClient: ZmqClient | null, subClient: ZmqClient | null, pubClient: ZmqClient | null let subHost = '', pubHost = '' diff --git a/src/views/firmwareUpload/index.vue b/src/views/firmwareUpload/index.vue index a9c84d2..9da863b 100644 --- a/src/views/firmwareUpload/index.vue +++ b/src/views/firmwareUpload/index.vue @@ -1,6 +1,6 @@