From 9be6a06930f165bf9cfd523995040571f7b25498 Mon Sep 17 00:00:00 2001 From: betaqi <3188864257@qq.com> Date: Fri, 23 May 2025 17:24:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=97=A0=E6=95=B0=E6=8D=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global.types/components.d.ts | 2 ++ src/views/stationData/components/deviceDrawer.vue | 1 + src/views/stationData/components/newDataChart.vue | 3 ++- src/views/stationData/transferData.vue | 8 +------- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/global.types/components.d.ts b/global.types/components.d.ts index b6c94ef..e1252ea 100644 --- a/global.types/components.d.ts +++ b/global.types/components.d.ts @@ -24,6 +24,8 @@ declare module 'vue' { ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] + ElEmpt: typeof import('element-plus/es')['ElEmpt'] + 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/views/stationData/components/deviceDrawer.vue b/src/views/stationData/components/deviceDrawer.vue index 5b80a8c..06a7c62 100644 --- a/src/views/stationData/components/deviceDrawer.vue +++ b/src/views/stationData/components/deviceDrawer.vue @@ -246,6 +246,7 @@ const checkPointList = ref([]) function onchangePoints(checkPoints: IMyPoint[]) { + checkPointList.value = [] checkPointList.value = checkPoints chartDatas.clear() axisData.clear() diff --git a/src/views/stationData/components/newDataChart.vue b/src/views/stationData/components/newDataChart.vue index 7b5f468..24def26 100644 --- a/src/views/stationData/components/newDataChart.vue +++ b/src/views/stationData/components/newDataChart.vue @@ -1,6 +1,7 @@ diff --git a/src/views/stationData/transferData.vue b/src/views/stationData/transferData.vue index 0b0fc4d..4c56971 100644 --- a/src/views/stationData/transferData.vue +++ b/src/views/stationData/transferData.vue @@ -616,7 +616,7 @@ function zmqUpgradeCb(msg: PubMsgData) { const offTransferDlg = ref() const pubIdWithOffDevice = new Map() -const importQueue = ref<{ msg: PublishMsg<'import'>; offDevice: IOfflineDevice }[]>([]) // 队列 +const importQueue = ref<{ msg: PublishMsg<'import'>; offDevice: IOfflineDevice }[]>([]) const isImporting = ref(false) async function processNextImport() { @@ -635,12 +635,10 @@ async function processNextImport() { } function onOffDeviceTransfer(msg: PublishMsg<'import'>[], offDevice: IOfflineDevice[]) { - // 将设备和消息添加到队列中 msg.forEach((m, index) => { importQueue.value.push({ msg: m, offDevice: offDevice[index] }) }) - // 开始处理队列 processNextImport() onBatchCancel() openTransferMask('import') @@ -669,7 +667,6 @@ function zmqImportCb(msg: PubMsgData) { } if (code !== ZmqMsgResultType.PROGRESS) { - // 从队列中移除已处理的消息 importQueue.value.shift() isImporting.value = false if (code === ZmqMsgResultType.ERROR) { @@ -679,7 +676,6 @@ function zmqImportCb(msg: PubMsgData) { status: 'error' }) } - // 处理队列中的下一个消息 processNextImport() } } @@ -696,11 +692,9 @@ function zmqImportTimeoutCb(msg: TimeoutMsg) { device: offDevice, status: 'error' }) - // 从队列中移除超时的项目 importQueue.value.shift() isImporting.value = false - // 处理队列中的下一个项目 processNextImport() } }