From 30b19c9100d74c9e0b7cdee9ed5d7b77310b56f5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 14 Dec 2024 17:24:33 +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=E6=96=B0=E5=A2=9E=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=88=86=E7=BB=84=E7=9A=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/group/index.ts | 37 ++++ .../iot/device/group/DeviceGroupForm.vue | 112 ++++++++++++ src/views/iot/device/group/index.vue | 168 ++++++++++++++++++ 3 files changed, 317 insertions(+) create mode 100644 src/api/iot/device/group/index.ts create mode 100644 src/views/iot/device/group/DeviceGroupForm.vue create mode 100644 src/views/iot/device/group/index.vue diff --git a/src/api/iot/device/group/index.ts b/src/api/iot/device/group/index.ts new file mode 100644 index 00000000..5d9f8df7 --- /dev/null +++ b/src/api/iot/device/group/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +// IoT 设备分组 VO +export interface DeviceGroupVO { + id: number // 分组 ID + name: string // 分组名字 + status: number // 分组状态 + description: string // 分组描述 +} + +// IoT 设备分组 API +export const DeviceGroupApi = { + // 查询IoT 设备分组分页 + getDeviceGroupPage: async (params: any) => { + return await request.get({ url: `/iot/device-group/page`, params }) + }, + + // 查询IoT 设备分组详情 + getDeviceGroup: async (id: number) => { + return await request.get({ url: `/iot/device-group/get?id=` + id }) + }, + + // 新增IoT 设备分组 + createDeviceGroup: async (data: DeviceGroupVO) => { + return await request.post({ url: `/iot/device-group/create`, data }) + }, + + // 修改IoT 设备分组 + updateDeviceGroup: async (data: DeviceGroupVO) => { + return await request.put({ url: `/iot/device-group/update`, data }) + }, + + // 删除IoT 设备分组 + deleteDeviceGroup: async (id: number) => { + return await request.delete({ url: `/iot/device-group/delete?id=` + id }) + } +} \ No newline at end of file diff --git a/src/views/iot/device/group/DeviceGroupForm.vue b/src/views/iot/device/group/DeviceGroupForm.vue new file mode 100644 index 00000000..64872573 --- /dev/null +++ b/src/views/iot/device/group/DeviceGroupForm.vue @@ -0,0 +1,112 @@ + + diff --git a/src/views/iot/device/group/index.vue b/src/views/iot/device/group/index.vue new file mode 100644 index 00000000..0646fc72 --- /dev/null +++ b/src/views/iot/device/group/index.vue @@ -0,0 +1,168 @@ + + +