From 0457ff29c076e9986df9941b784be35f80e67e2a Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 29 六月 2026 16:46:37 +0800
Subject: [PATCH] feat: 添加线路巡检和安全设施巡检模块
---
src/api/safeProduction/lineInspection.js | 109 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 96 insertions(+), 13 deletions(-)
diff --git a/src/api/safeProduction/lineInspection.js b/src/api/safeProduction/lineInspection.js
index 94dd2e3..5e0c807 100644
--- a/src/api/safeProduction/lineInspection.js
+++ b/src/api/safeProduction/lineInspection.js
@@ -7,36 +7,119 @@
// 鑾峰彇绾胯矾宸℃鍒楄〃
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",
});
}
--
Gitblit v1.9.3