feat: 新功能开发,设备实时数据查看等。
This commit is contained in:
16
src/api/fishery/monitorHistory/index.ts
Normal file
16
src/api/fishery/monitorHistory/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeviceSensorDataQueryBo, DeviceSensorData } from '@/api/fishery/monitorHistory/types';
|
||||
|
||||
/**
|
||||
* 查询设备历史数据
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const getHistoryData = (query: DeviceSensorDataQueryBo): AxiosPromise<DeviceSensorData[]> => {
|
||||
return request({
|
||||
url: '/td/device/getHistoryData',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
136
src/api/fishery/monitorHistory/types.ts
Normal file
136
src/api/fishery/monitorHistory/types.ts
Normal file
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* 设备传感器数据查询对象
|
||||
*/
|
||||
export interface DeviceSensorDataQueryBo extends BaseEntity {
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
mobilePhone?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
|
||||
/**
|
||||
* 时间间隔
|
||||
*/
|
||||
intervalType?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备传感器数据对象
|
||||
*/
|
||||
export interface DeviceSensorData {
|
||||
// 测量字段(随时间变化的数值)
|
||||
/**
|
||||
* 时序主键时间戳
|
||||
*/
|
||||
time: string;
|
||||
|
||||
/**
|
||||
* 数据创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
dissolvedOxygen: number;
|
||||
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
temperature: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
saturability: number;
|
||||
|
||||
/**
|
||||
* pH值
|
||||
*/
|
||||
ph: number;
|
||||
|
||||
/**
|
||||
* 盐度
|
||||
*/
|
||||
salinity: number;
|
||||
|
||||
/**
|
||||
* 参考值
|
||||
*/
|
||||
treference: number;
|
||||
|
||||
/**
|
||||
* 荧光值
|
||||
*/
|
||||
tfluorescence: number;
|
||||
|
||||
/**
|
||||
* 相位差
|
||||
*/
|
||||
phaseDifference: number;
|
||||
|
||||
/**
|
||||
* 电池电量
|
||||
*/
|
||||
battery: number;
|
||||
|
||||
// 标签字段(元数据,不随时间频繁变化)
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum: string;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
deviceId: number;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
userId: number;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
userName: string;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
mobilePhone: string;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
deviceName: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType: number;
|
||||
}
|
||||
Reference in New Issue
Block a user