From cd2172a46a8f6bda0698e8a653e62d5576958478 Mon Sep 17 00:00:00 2001 From: hwj Date: Tue, 30 Dec 2025 15:23:07 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E9=87=87=E9=9B=86=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 2 +- src/views/iot/device/index.vue | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 3522a338..5c954f6e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -15,7 +15,7 @@ const dictStore = useDictStoreWithOut() export interface DictDataType { dictType: string label: string - value: string | number | boolean + value: string | number colorType: ElementPlusInfoType | '' cssClass: string } diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index f72ac725..2cb22589 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -314,12 +314,16 @@ const handleCopy = async (id: number) => { /** 导出按钮操作 */ const handleExport = async () => { + if (!selectedIds.value.length) { + message.error('请选择需要导出的数据') + return + } try { // 导出的二次确认 await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await DeviceApi.exportDevice(queryParams) + const data = await DeviceApi.exportDevice({ ids: selectedIds.value.join(',') }) download.excel(data, '物联设备.xls') } catch { } finally {