import request from '@/utils/request'
|
|
// ==================== 巡检记录接口 ====================
|
export function getInspectionRecordList(query) {
|
return request({
|
url: '/safety/inspection/record/list',
|
method: 'get',
|
params: query
|
})
|
}
|
|
export function addInspectionRecord(data) {
|
return request({
|
url: '/safety/inspection/record/add',
|
method: 'post',
|
data: data
|
})
|
}
|
|
export function updateInspectionRecord(data) {
|
return request({
|
url: '/safety/inspection/record/update',
|
method: 'put',
|
data: data
|
})
|
}
|
|
export function deleteInspectionRecord(id) {
|
return request({
|
url: '/safety/inspection/record/delete/' + id,
|
method: 'delete'
|
})
|
}
|
|
// 同步巡检数据(模拟子系统)
|
export function syncInspectionData() {
|
return request({
|
url: '/safety/inspection/record/sync',
|
method: 'post'
|
})
|
}
|
|
// ==================== 统计报表接口 ====================
|
export function getTodayStatistics() {
|
return request({
|
url: '/safety/inspection/statistics/today',
|
method: 'get'
|
})
|
}
|
|
export function getTrendStatistics(params) {
|
return request({
|
url: '/safety/inspection/statistics/trend',
|
method: 'get',
|
params: params
|
})
|
}
|
|
export function getTypeStatistics(params) {
|
return request({
|
url: '/safety/inspection/statistics/type',
|
method: 'get',
|
params: params
|
})
|
}
|
|
export function getInspectorStatistics(params) {
|
return request({
|
url: '/safety/inspection/statistics/inspector',
|
method: 'get',
|
params: params
|
})
|
}
|