list-var.ts
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import axios from "axios";
import qs from "qs";
/**
* 设备分组对象
*/
export interface DeviceVarEntity {
id: number;
status:number,
name:string,
variableCoding:string,
variableAttribute:string,
monitoringEquipmentus:string,
owningChannel:string,
dataSource:string,
dataAddress:string,
dataType:string,
coefficient:string,
storageCycle:string,
operations:string,
}
/**
* 用户查询对象
*/
export interface DeviceVarParams extends Partial<DeviceVarEntity> {
current: number;
pageSize: number;
}
/**
* 用户分页对象
*/
export interface DeviceGroupListPage {
list: DeviceVarEntity[];
total: number;
}
//获取用户列表
export function queryDeviceGroupvarList(params: DeviceVarParams): any {
return axios.get<DeviceGroupListPage>("/power/energy/device/var", {
params,
paramsSerializer: (obj) => {
return qs.stringify(obj);
},
});
}
export function queryDeviceGroupvarList2(params: DeviceVarParams): any {
return axios.get<DeviceGroupListPage>("/power/energy/device/var2", {
params,
paramsSerializer: (obj) => {
return qs.stringify(obj);
},
});
}