import request from "@/utils/request";
|
|
/**
|
* 线路巡检API接口
|
*/
|
|
// 获取线路定时巡检任务列表
|
export function getLineInspectionTaskList(params) {
|
return request({
|
url: "/safeLineInspectionTask/page",
|
method: "get",
|
params,
|
});
|
}
|
|
// 根据ID获取线路定时巡检任务详情
|
export function getLineInspectionTaskById(id) {
|
return request({
|
url: `/safeLineInspectionTask/${id}`,
|
method: "get",
|
});
|
}
|
|
// 新增线路定时巡检任务
|
export function addLineInspectionTask(data) {
|
return request({
|
url: "/safeLineInspectionTask",
|
method: "post",
|
data,
|
});
|
}
|
|
// 修改线路定时巡检任务
|
export function updateLineInspectionTask(data) {
|
return request({
|
url: "/safeLineInspectionTask",
|
method: "put",
|
data,
|
});
|
}
|
|
// 删除线路定时巡检任务
|
export function deleteLineInspectionTask(ids) {
|
return request({
|
url: "/safeLineInspectionTask/" + ids.join(","),
|
method: "delete",
|
});
|
}
|
|
// 获取线路巡检列表
|
export function getLineInspectionList(params) {
|
return request({
|
url: "/safeLineInspection/page",
|
method: "get",
|
params,
|
});
|
}
|
|
// 根据ID获取线路巡检详情
|
export function getLineInspectionById(id) {
|
return request({
|
url: `/safeLineInspection/${id}`,
|
method: "get",
|
});
|
}
|
|
// 新增线路巡检
|
export function addLineInspection(data) {
|
return request({
|
url: "/safeLineInspection",
|
method: "post",
|
data,
|
});
|
}
|
|
// 修改线路巡检
|
export function updateLineInspection(data) {
|
return request({
|
url: "/safeLineInspection",
|
method: "put",
|
data,
|
});
|
}
|
|
// 删除线路巡检
|
export function deleteLineInspection(ids) {
|
return request({
|
url: "/safeLineInspection/" + ids.join(","),
|
method: "delete",
|
});
|
}
|
|
// 执行巡检
|
export function executeLineInspection(data) {
|
return request({
|
url: "/safeLineInspection/execute",
|
method: "put",
|
data,
|
});
|
}
|
|
// 获取巡检记录列表
|
export function getInspectionRecords(inspectionId) {
|
return request({
|
url: `/safeLineInspectionRecord/list/${inspectionId}`,
|
method: "get",
|
});
|
}
|
|
// 新增巡检记录
|
export function addInspectionRecord(data) {
|
return request({
|
url: "/safeLineInspectionRecord",
|
method: "post",
|
data,
|
});
|
}
|
|
// 修改巡检记录
|
export function updateInspectionRecord(data) {
|
return request({
|
url: "/safeLineInspectionRecord",
|
method: "put",
|
data,
|
});
|
}
|
|
// 删除巡检记录
|
export function deleteInspectionRecord(ids) {
|
return request({
|
url: "/safeLineInspectionRecord/" + ids.join(","),
|
method: "delete",
|
});
|
}
|
|
// 批量新增巡检记录
|
export function batchAddInspectionRecords(data) {
|
return request({
|
url: "/safeLineInspectionRecord/batch",
|
method: "post",
|
data,
|
});
|
}
|
|
// 获取巡检隐患列表
|
export function getInspectionHazards(params) {
|
return request({
|
url: "/safeLineInspectionHazard/page",
|
method: "get",
|
params,
|
});
|
}
|
|
// 根据巡检任务ID获取隐患列表
|
export function getHazardsByInspectionId(inspectionId) {
|
return request({
|
url: `/safeLineInspectionHazard/list/${inspectionId}`,
|
method: "get",
|
});
|
}
|
|
// 新增隐患
|
export function addInspectionHazard(data) {
|
return request({
|
url: "/safeLineInspectionHazard",
|
method: "post",
|
data,
|
});
|
}
|
|
// 修改隐患
|
export function updateInspectionHazard(data) {
|
return request({
|
url: "/safeLineInspectionHazard",
|
method: "put",
|
data,
|
});
|
}
|
|
// 删除隐患
|
export function deleteInspectionHazard(ids) {
|
return request({
|
url: "/safeLineInspectionHazard/" + ids.join(","),
|
method: "delete",
|
});
|
}
|