|
@@ -2,7 +2,7 @@ import {
|
|
|
addDevice, addSubDevice, delDevice, delDeviceMul, delDeviceTag,
|
|
addDevice, addSubDevice, delDevice, delDeviceMul, delDeviceTag,
|
|
|
getDeviceById, getDeviceCount, getDeviceList, getDeviceMsgList, addDeviceMsg, getDeviceTag,
|
|
getDeviceById, getDeviceCount, getDeviceList, getDeviceMsgList, addDeviceMsg, getDeviceTag,
|
|
|
getSubDeviceList, updateDeviceLabel, addDeviceCmd, getDeviceCmdList, addDeviceTag, addDeviceGroup,
|
|
getSubDeviceList, updateDeviceLabel, addDeviceCmd, getDeviceCmdList, addDeviceTag, addDeviceGroup,
|
|
|
- listDeviceGroup, postGroupBindDevice, delGroupBindDevice, getDeviceByGroup, getDevicePage
|
|
|
|
|
|
|
+ listDeviceGroup, postGroupBindDevice, delGroupBindDevice, getDeviceByGroup, getDevicePage, delSubDevice, getDeviceAttribute, getDevicShadow
|
|
|
} from '@/api/iot/device'
|
|
} from '@/api/iot/device'
|
|
|
import { DeviceMsgEnum } from '@/enum/common'
|
|
import { DeviceMsgEnum } from '@/enum/common'
|
|
|
import { message } from 'ant-design-vue'
|
|
import { message } from 'ant-design-vue'
|
|
@@ -97,6 +97,11 @@ export class DeviceContriller {
|
|
|
message.success('新增成功')
|
|
message.success('新增成功')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ static async delSub (id: string) {
|
|
|
|
|
+ await delSubDevice(id)
|
|
|
|
|
+ message.success('删除成功')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
static async ListTag (params: {deviceId: number | string}) {
|
|
static async ListTag (params: {deviceId: number | string}) {
|
|
|
return await getDeviceTag(params)
|
|
return await getDeviceTag(params)
|
|
|
}
|
|
}
|
|
@@ -190,4 +195,12 @@ export class DeviceContriller {
|
|
|
static async getDeviceByGroup (params: IOT.API.DEVICE.GroupQueryParams) {
|
|
static async getDeviceByGroup (params: IOT.API.DEVICE.GroupQueryParams) {
|
|
|
return await getDeviceByGroup(params)
|
|
return await getDeviceByGroup(params)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ static async getLiveData (deviceId: string) {
|
|
|
|
|
+ return await getDeviceAttribute(deviceId)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ static async getDevicShadow (deviceId: string) {
|
|
|
|
|
+ return await getDevicShadow(deviceId)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|