index.js
2.38 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* params ((page,pageSize))
* data ((deviceProfileIds))
*/
//保养计划列表
const getMaintenancePlanListApi = (urlParams, data) => {
const { page, pageSize } = urlParams
return uni.$u.http.post(`/yt/preservePlan/pageData?page=${page}&pageSize=${pageSize}`, data)
}
// 保养计划列表详情
const getMaintenancePlanDetail = (id) => {
return uni.$u.http.get(`/yt/preservePlan/detail?id=${id}`)
}
//保养记录列表
const getMaintenanceRecordListApi = (urlParams, data) => {
const { page, pageSize } = urlParams
return uni.$u.http.post(`/yt/preserveRecord/pageData?page=${page}&pageSize=${pageSize}`, data)
}
// 保养记录列表详情
const getMaintenanceRecordDetail = (id) => {
return uni.$u.http.get(`/yt/preserveRecord/detail?id=${id}`)
}
//保养明细列表
const getMaintenanceDetailApi = (urlParams, data) => {
const { page, pageSize } = urlParams
return uni.$u.http.post(`/yt/preservePlan/pageDetail?page=${page}&pageSize=${pageSize}`, data)
}
//巡检计划列表
const getPatrolPlanListApi = (urlParams) => {
const { page, pageSize,type='',name='',startTimeStart='',startTimeEnd='',endTimeStart='',endTimeEnd=''} = urlParams
return uni.$u.http.get(`/yt/inspectionPlan?page=${page}&pageSize=${pageSize}&type=${type}&name=${name}&startTimeStart=${startTimeStart}&startTimeEnd=${startTimeEnd}&endTimeStart=${endTimeStart}&endTimeEnd=${endTimeEnd}`)
}
// 巡检计划列表详情
const getPatrolPlanDetail = (id) => {
return uni.$u.http.get(`/yt/inspectionPlan/detail?id=${id}`)
}
//巡检记录列表
const getPatrolRecordListApi = (urlParams) => {
const { page, pageSize,inspectionPlanId='',inspectorId='',startTime='',endTime='',recordResult='',inspectionPlanName='',deviceId = ''} = urlParams
return uni.$u.http.get(`/yt/inspectionRecord?page=${page}&pageSize=${pageSize}&inspectionPlanId=${inspectionPlanId}&inspectorId=${inspectorId}&startTime=${startTime}&endTime=${endTime}&recordResult=${recordResult}&inspectionPlanName=${inspectionPlanName}&deviceId=${deviceId}`)
}
// 巡检记录列表详情
const getPatrolRecordDetail = (id) => {
return uni.$u.http.get(`/yt/inspectionRecord/detail?id=${id}`)
}
export default {
getMaintenancePlanListApi,
getMaintenancePlanDetail,
getMaintenanceRecordListApi,
getMaintenanceRecordDetail,
getMaintenanceDetailApi,
getPatrolPlanListApi,
getPatrolPlanDetail,
getPatrolRecordListApi,
getPatrolRecordDetail
}