From d3d2f9861c3d4bccfb9594b7efd76e62d3b44b65 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期三, 03 六月 2026 16:41:31 +0800
Subject: [PATCH] feat: 添加合格率计算及显示功能
---
src/views/equipmentManagement/inspectionManagement/index.vue | 44 ++++++++++++++++++++++++++++----------------
1 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/src/views/equipmentManagement/inspectionManagement/index.vue b/src/views/equipmentManagement/inspectionManagement/index.vue
index be43997..c6c21d9 100644
--- a/src/views/equipmentManagement/inspectionManagement/index.vue
+++ b/src/views/equipmentManagement/inspectionManagement/index.vue
@@ -197,24 +197,24 @@
formatData: cell => {
if (!cell) return "-";
try {
- return dayjs(cell).format("YYYY-MM-DD HH:mm:ss");
+ return dayjs(cell).format("YYYY-MM-DD");
} catch {
return cell;
}
},
},
- {
- prop: "inspectionResult",
- label: "宸℃缁撴灉",
- minWidth: 100,
- dataType: "tag",
- formatData: val => {
- return val == 1 ? "姝e父" : "寮傚父";
- },
- formatType: val => {
- return val == 1 ? "success" : "danger";
- },
- },
+ // {
+ // prop: "inspectionResult",
+ // label: "宸℃缁撴灉",
+ // minWidth: 100,
+ // dataType: "tag",
+ // formatData: val => {
+ // return val == 1 ? "姝e父" : "寮傚父";
+ // },
+ // formatType: val => {
+ // return val == 1 ? "success" : "danger";
+ // },
+ // },
{ prop: "abnormalDescription", label: "寮傚父鎻忚堪", minWidth: 150 },
]);
@@ -231,6 +231,12 @@
operation: operations
.map(op => {
switch (op) {
+ case "view":
+ return {
+ name: "璇︽儏",
+ clickFun: openViewDialog,
+ color: "#409EFF",
+ };
case "edit":
return {
name: "缂栬緫",
@@ -273,14 +279,14 @@
];
operationsArr.value = ["edit"];
} else if (value === "task") {
- const operationColumn = getOperationColumn(["upload", "viewFile"]);
+ const operationColumn = getOperationColumn(["view", "upload", "viewFile"]);
// 宸℃璁板綍涓嶅睍绀�"鏄惁鍚敤"鍒�
const taskColumns = columns.value.filter(col => col.prop !== "isEnabled");
tableColumns.value = [
...taskColumns,
...(operationColumn ? [operationColumn] : []),
];
- operationsArr.value = ["upload", "viewFile"];
+ operationsArr.value = ["view", "upload", "viewFile"];
}
pageNum.value = 1;
pageSize.value = 10;
@@ -377,7 +383,13 @@
const openUploadDialog = row => {
nextTick(() => {
- uploadFiles.value?.openDialog(row);
+ uploadFiles.value?.openDialog("add", row);
+ });
+ };
+
+ const openViewDialog = row => {
+ nextTick(() => {
+ uploadFiles.value?.openDialog("view", row);
});
};
--
Gitblit v1.9.3