From a2dec90edf2f40716c4bcd98384fac857ab44b02 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 14 Dec 2024 19:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91IoT=EF=BC=9A=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=A2=9E=E5=8A=A0=E6=89=B9=E9=87=8F=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 7 ++++- src/views/iot/device/device/index.vue | 37 ++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index 536f52a6..49b50337 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -82,11 +82,16 @@ export const DeviceApi = { return await request.put({ url: `/iot/device/update-status`, data }) }, - // 删除设备 + // 删除单个设备 deleteDevice: async (id: number) => { return await request.delete({ url: `/iot/device/delete?id=` + id }) }, + // 删除多个设备 + deleteDeviceList: async (ids: number[]) => { + return await request.delete({ url: `/iot/device/delete-list`, params: { ids: ids.join(',') } }) + }, + // 导出设备 exportDeviceExcel: async (params: any) => { return await request.download({ url: `/iot/device/export-excel`, params }) diff --git a/src/views/iot/device/device/index.vue b/src/views/iot/device/device/index.vue index 522ab918..e5f6f2cc 100644 --- a/src/views/iot/device/device/index.vue +++ b/src/views/iot/device/device/index.vue @@ -113,13 +113,29 @@ > 导出 + + 批量删除 + - + +