From 1966a2c10e4c4c8c2c7abf4a3f78ee3ca5506c3f Mon Sep 17 00:00:00 2001 From: hwj Date: Thu, 16 Apr 2026 15:24:58 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E5=8E=82=E5=8C=BA=E7=BB=93?= =?UTF-8?q?=E6=9E=84-=E6=96=B0=E5=A2=9E/=E7=BC=96=E8=BE=91-=E5=85=B3?= =?UTF-8?q?=E8=81=94=E9=87=87=E9=9B=86=E8=AE=BE=E5=A4=87=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 3 +++ src/views/mes/organization/OrganizationForm.vue | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index 3e85b97c..6b5407cc 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -99,6 +99,9 @@ export const DeviceApi = { getDeviceList2ByNoUsed: async (id: number) => { return await request.get({ url: `/iot/device/noUsedlist2?id=` + id }) }, + getAvailableList: async () => { + return await request.get({ url: `/iot/device/available-list` }) + }, // 新增物联设备 createDevice: async (data: DeviceVO) => { return await request.post({ url: `/iot/device/create`, data }) diff --git a/src/views/mes/organization/OrganizationForm.vue b/src/views/mes/organization/OrganizationForm.vue index efd2addb..87a88b73 100644 --- a/src/views/mes/organization/OrganizationForm.vue +++ b/src/views/mes/organization/OrganizationForm.vue @@ -201,9 +201,9 @@ const open = async (type: string, id?: number) => { } //await getMachineComponentTree() if (type == 'create' || typeof formData.value.dvId != 'number') { - dvList.value = await DeviceApi.getDeviceListByNoUsed() + dvList.value = await DeviceApi.getAvailableList() } else { - dvList.value = await DeviceApi.getDeviceList2ByNoUsed(formData.value.dvId) + dvList.value = await DeviceApi.getAvailableList() } } defineExpose({ open }) // 提供 open 方法,用于打开弹窗