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;
|
||||
}
|
||||
4
src/types/components.d.ts
vendored
4
src/types/components.d.ts
vendored
@@ -17,9 +17,9 @@ declare module 'vue' {
|
||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
@@ -38,13 +38,13 @@ declare module 'vue' {
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElLink: typeof import('element-plus/es')['ElLink']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
|
||||
1681
src/views/index.vue
1681
src/views/index.vue
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user