style:厂区结构-新增/编辑-关联采集设备选项接口更换

pull/1/head
黄伟杰 1 month ago
parent 6ab008b512
commit 1966a2c10e

@ -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 })

@ -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

Loading…
Cancel
Save