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 @@ > 导出 + + 批量删除 + - + +