From 4f877d350db51b8ce7e965a90064b3871e26bd40 Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 26 Jan 2026 17:49:45 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E9=87=87=E9=9B=86=E7=82=B9?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B/=E6=95=B0=E6=8D=AE=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E7=9B=91=E6=8E=A7/=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 4 ++ src/views/iot/deviceattributetype/index.vue | 8 ++-- src/views/iot/historyData/index.vue | 33 +++++++++++++++++ src/views/iot/realTimeMonitoring/index.vue | 41 ++++++++++++++++++++- 4 files changed, 81 insertions(+), 5 deletions(-) diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index 4d5a2cd3..98d0565f 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -121,6 +121,10 @@ export const DeviceApi = { return await request.download({ url: `/iot/device/export-excel`, params }) }, + exportLineDevice: async (params) => { + return await request.download({ url: `/iot/device/export-line-device`, params }) + }, + getLineDevicePage: async (params: LineDevicePageParams) => { return await request.get({ url: `/iot/device/lineDevicePage`, params }) }, diff --git a/src/views/iot/deviceattributetype/index.vue b/src/views/iot/deviceattributetype/index.vue index bb2c1e2c..d189072e 100644 --- a/src/views/iot/deviceattributetype/index.vue +++ b/src/views/iot/deviceattributetype/index.vue @@ -228,11 +228,13 @@ const handleBatchDelete = async () => { /** 导出按钮操作 */ const handleExport = async () => { try { - // 导出的二次确认 await message.exportConfirm() - // 发起导出 exportLoading.value = true - const data = await DeviceAttributeTypeApi.exportDeviceAttributeType(queryParams) + const params: any = { + ...queryParams, + ids: selectedIds.value.length ? selectedIds.value.join(',') : undefined, + } + const data = await DeviceAttributeTypeApi.exportDeviceAttributeType(params) download.excel(data, '采集点分类.xls') } catch { } finally { diff --git a/src/views/iot/historyData/index.vue b/src/views/iot/historyData/index.vue index 8d9e8a0d..445ef772 100644 --- a/src/views/iot/historyData/index.vue +++ b/src/views/iot/historyData/index.vue @@ -50,6 +50,9 @@ 重置 + + 导出 + @@ -61,7 +64,9 @@ :stripe="true" :show-overflow-tooltip="true" row-key="id" + @selection-change="handleSelectionChange" > + @@ -98,14 +103,18 @@ diff --git a/src/views/iot/realTimeMonitoring/index.vue b/src/views/iot/realTimeMonitoring/index.vue index f5accc16..41784a5e 100644 --- a/src/views/iot/realTimeMonitoring/index.vue +++ b/src/views/iot/realTimeMonitoring/index.vue @@ -28,12 +28,23 @@ v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @ 重置 + + 导出 + - + + @@ -66,6 +77,7 @@ v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @