index.js
1.34 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
/**
* params ((page,pageSize))
* data ((deviceProfileIds))
*/
//设备类型
const getDeviceTypeApi = (data) => {
return uni.$u.http.post(`/yt/deviceCagegory/getAllCagegory`, data)
}
//设备台账列表
const getLedgerListApi = (urlParams, data) => {
const { page, pageSize } = urlParams
return uni.$u.http.post(`/yt/da/pageData?page=${page}&pageSize=${pageSize}`, data)
}
// 设备台账列表详情
const getLedgerListDetail = (id) => {
return uni.$u.http.get(`/yt/da/detail?id=${id}`)
}
//故障原因列表
const getFaultListApi = (urlParams, data) => {
const { page, pageSize } = urlParams
return uni.$u.http.post(`/yt/mr/pageData?page=${page}&pageSize=${pageSize}`, data)
}
// 故障原因列表详情
const getFaultListDetail = (id) => {
return uni.$u.http.get(`/yt/mr/detail?id=${id}`)
}
//巡检/保养方案列表
const getCheckPlanApi = (urlParams) => {
const { page, pageSize,type='',name='', status=''} = urlParams
return uni.$u.http.get(`/yt/checkPlan?page=${page}&pageSize=${pageSize}&type=${type}&name=${name}&status=${status}`)
}
//巡检/保养方案列表详情
const getCheckPlanDetail = (id) => {
return uni.$u.http.get(`/yt/checkPlan/get?id=${id}`)
}
export default {
getFaultListApi,
getFaultListDetail,
getCheckPlanApi,
getCheckPlanDetail,
getLedgerListApi,
getLedgerListDetail,
getDeviceTypeApi
}