| | |
| | | // 获取线路巡检列表 |
| | | export function getLineInspectionList(params) { |
| | | return request({ |
| | | url: "/device/lineInspection/list", |
| | | url: "/safeLineInspection/page", |
| | | method: "get", |
| | | params, |
| | | }); |
| | | } |
| | | |
| | | // 新增或修改线路巡检记录 |
| | | export function addOrEditLineInspection(data) { |
| | | // 根据ID获取线路巡检详情 |
| | | export function getLineInspectionById(id) { |
| | | return request({ |
| | | url: "/device/lineInspection/addOrEdit", |
| | | url: `/safeLineInspection/${id}`, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // 新增线路巡检 |
| | | export function addLineInspection(data) { |
| | | return request({ |
| | | url: "/safeLineInspection", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 删除线路巡检记录 |
| | | export function deleteLineInspection(ids) { |
| | | // 修改线路巡检 |
| | | export function updateLineInspection(data) { |
| | | return request({ |
| | | url: "/device/lineInspection/delete", |
| | | method: "delete", |
| | | data: ids, |
| | | url: "/safeLineInspection", |
| | | method: "put", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 导出线路巡检记录 |
| | | export function exportLineInspection(params) { |
| | | // 删除线路巡检 |
| | | export function deleteLineInspection(ids) { |
| | | return request({ |
| | | url: "/device/lineInspection/export", |
| | | url: "/safeLineInspection/" + ids.join(","), |
| | | method: "delete", |
| | | }); |
| | | } |
| | | |
| | | // 完成巡检 |
| | | export function completeLineInspection(id) { |
| | | return request({ |
| | | url: `/safeLineInspection/complete/${id}`, |
| | | method: "put", |
| | | }); |
| | | } |
| | | |
| | | // 获取巡检记录列表 |
| | | 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 batchAddInspectionRecords(data) { |
| | | return request({ |
| | | url: "/safeLineInspectionRecord/batch", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 获取巡检隐患列表 |
| | | export function getInspectionHazards(params) { |
| | | return request({ |
| | | url: "/safeLineInspectionHazard/page", |
| | | method: "get", |
| | | params, |
| | | responseType: 'blob', |
| | | }); |
| | | } |
| | | |
| | | // 根据巡检任务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", |
| | | }); |
| | | } |