From a568ea37ef137e65e3cb5b3f0e3a5cceed96fb95 Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 1 Apr 2026 18:19:38 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/group/index.ts | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/api/iot/device/group/index.ts diff --git a/src/api/iot/device/group/index.ts b/src/api/iot/device/group/index.ts new file mode 100644 index 0000000..96c26f0 --- /dev/null +++ b/src/api/iot/device/group/index.ts @@ -0,0 +1,32 @@ +import request from '@/config/axios' + +export interface DeviceGroupVO { + id?: number + name: string + status: number + description?: string + deviceCount?: number + createTime?: Date +} + +export const DeviceGroupApi = { + getDeviceGroupPage: async (params: any) => { + return await request.get({ url: '/iot/device-group/page', params }) + }, + + getDeviceGroup: async (id: number) => { + return await request.get({ url: '/iot/device-group/get?id=' + id }) + }, + + createDeviceGroup: async (data: DeviceGroupVO) => { + return await request.post({ url: '/iot/device-group/create', data }) + }, + + updateDeviceGroup: async (data: DeviceGroupVO) => { + return await request.put({ url: '/iot/device-group/update', data }) + }, + + deleteDeviceGroup: async (id: number) => { + return await request.delete({ url: '/iot/device-group/delete?id=' + id }) + } +}