From 55d6f86eb7dc8aada306405dadd29a2716a6e009 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 23 五月 2026 14:46:41 +0800
Subject: [PATCH] 设备巡检只留一套图片上传
---
src/pages/inspectionUpload/index.vue | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/pages/inspectionUpload/index.vue b/src/pages/inspectionUpload/index.vue
index bedc38f..d83eac8 100644
--- a/src/pages/inspectionUpload/index.vue
+++ b/src/pages/inspectionUpload/index.vue
@@ -296,18 +296,22 @@
};
const getFileStatus = record => {
- let _beforeProduction =
- record.beforeProduction && record.beforeProduction.length;
- let _afterProduction =
- record.afterProduction && record.afterProduction.length;
- let _productionIssues =
- record.productionIssues && record.productionIssues.length;
- if (_beforeProduction && _afterProduction && _productionIssues) {
- return 2;
- } else if (_beforeProduction || _afterProduction || _productionIssues) {
- return 1;
+ // 妫�鏌ユ槸鍚︽湁宸℃鐓х墖 (commonFileListBeforeVO)
+ const hasFiles =
+ (record.commonFileListBeforeVO &&
+ record.commonFileListBeforeVO.length > 0) ||
+ (record.commonFileListAfterVO && record.commonFileListAfterVO.length > 0) ||
+ (record.commonFileListVO && record.commonFileListVO.length > 0);
+
+ if (hasFiles) {
+ return 2; // 宸插畬鎴�
+ } else if (
+ record.inspectionResult !== undefined &&
+ record.inspectionResult !== null
+ ) {
+ return 1; // 宸℃涓� (宸叉湁缁撴灉浣嗘病鐓х墖锛屾垨鑰呮牴鎹笟鍔¢�昏緫瀹氫箟)
} else {
- return 0;
+ return 0; // 鏈贰妫�
}
};
@@ -400,7 +404,12 @@
// 鏌ョ湅闄勪欢 - 璺宠浆鍒伴檮浠堕〉闈�
const viewAttachments = async task => {
- const taskData = encodeURIComponent(JSON.stringify(task));
+ // 浠呬紶閫掑繀瑕佺殑浠诲姟淇℃伅鍜� commonFileListBeforeVO 闄勪欢鍒楄〃
+ const taskInfoToPass = {
+ taskName: task.taskName,
+ commonFileListBeforeVO: task.commonFileListBeforeVO || [],
+ };
+ const taskData = encodeURIComponent(JSON.stringify(taskInfoToPass));
uni.navigateTo({
url: `/pages/inspectionUpload/attachment?taskInfo=${taskData}`,
});
--
Gitblit v1.9.3