From 11b40328f7aa7599f89189d0ebcbbdf8773f9e1b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 21 四月 2026 10:41:41 +0800
Subject: [PATCH] 新疆马铃薯 1.巡检记录添加巡检状态和巡检结果展示字段
---
src/views/equipmentManagement/inspectionManagement/index.vue | 38 +++++++++++++++++++++++++++++++++++++-
1 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/src/views/equipmentManagement/inspectionManagement/index.vue b/src/views/equipmentManagement/inspectionManagement/index.vue
index 86e9289..d1b75e9 100644
--- a/src/views/equipmentManagement/inspectionManagement/index.vue
+++ b/src/views/equipmentManagement/inspectionManagement/index.vue
@@ -174,6 +174,41 @@
{ prop: "createTime", label: "鐧昏鏃ユ湡", minWidth: 100 },
]);
+// 宸℃鐘舵�佸垪锛堜粎瀹氭椂浠诲姟璁板綍鏄剧ず锛�
+const inspectionStatusColumn = {
+ prop: "inspectionStatus",
+ label: "宸℃鐘舵��",
+ minWidth: 100,
+ dataType: "tag",
+ formatData: (value) =>
+ ({
+ 1: "寰呭贰妫�",
+ 2: "宸插贰妫�",
+ }[value] || ""),
+ formatType: (value) =>
+ ({
+ 1: "warning",
+ 2: "success",
+ }[value] || "info"),
+};
+// 宸℃缁撴灉鍒楋紙浠呭畾鏃朵换鍔¤褰曟樉绀猴級
+const inspectionResultColumn = {
+ prop: "inspectionResult",
+ label: "宸℃缁撴灉",
+ minWidth: 100,
+ dataType: "tag",
+ formatData: (value) =>
+ ({
+ 1: "姝e父",
+ 2: "寮傚父",
+ }[value] || ""),
+ formatType: (value) =>
+ ({
+ 1: "success",
+ 2: "error",
+ }[value] || "info"),
+};
+
const getOperationColumn = (operations) => {
if (!operations || operations.length === 0) {
return null;
@@ -222,7 +257,8 @@
tableColumns.value = [...columns.value, ...(operationColumn ? [operationColumn] : [])];
} else {
const operationColumn = getOperationColumn(["viewFile"]);
- tableColumns.value = [...columns.value, ...(operationColumn ? [operationColumn] : [])];
+ // 瀹氭椂浠诲姟璁板綍娣诲姞宸℃鐘舵�佸垪
+ tableColumns.value = [...columns.value, inspectionStatusColumn, inspectionResultColumn, ...(operationColumn ? [operationColumn] : [])];
}
pageNum.value = 1;
pageSize.value = 10;
--
Gitblit v1.9.3