1
|
|
-import type { DeviceAttributeItemType, DeviceItemType, DeviceProfileItemType, OrganizationItemType, RpcCommandType, SendValue, ThingsModel, ThingsModelItemType } from './model'
|
|
1
|
+import type { DeviceActiveType, DeviceAttributeItemType, DeviceItemType, DeviceProfileItemType, OrganizationItemType, RpcCommandType, SendValue, ThingsModel, ThingsModelItemType } from './model'
|
2
|
2
|
import { CommandWayEnum } from '@/enums/commandEnum'
|
3
|
3
|
import type { DeviceTypeEnum } from '@/enums/datasource'
|
4
|
4
|
import { isShareMode } from '@/utils/env'
|
...
|
...
|
@@ -113,7 +113,7 @@ export const genModbusCommand = (data: GenModbusCommandType) => { |
113
|
113
|
|
114
|
114
|
// 获取设备状态,在线 or 离线时间 entityId:设备id
|
115
|
115
|
export const getDeviceActiveTime = (entityId: string) => {
|
116
|
|
- return defHttp.get(
|
|
116
|
+ return defHttp.get<DeviceActiveType[]>(
|
117
|
117
|
{
|
118
|
118
|
url: `/plugins/telemetry/DEVICE/${entityId}/values/attributes?keys=active`,
|
119
|
119
|
},
|
...
|
...
|
|