From 8ef070c84a703c4a8b838bf9320d68d00a7d6dca Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 28 五月 2026 11:15:32 +0800
Subject: [PATCH] 设备巡检去掉高度限制

---
 src/views/equipmentManagement/inspectionManagement/components/uploadFiles.vue |   54 ++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/src/views/equipmentManagement/inspectionManagement/components/uploadFiles.vue b/src/views/equipmentManagement/inspectionManagement/components/uploadFiles.vue
index 472bf99..9ac7b07 100644
--- a/src/views/equipmentManagement/inspectionManagement/components/uploadFiles.vue
+++ b/src/views/equipmentManagement/inspectionManagement/components/uploadFiles.vue
@@ -14,7 +14,7 @@
 
       <div class="exception-section">
         <div class="section-title">鏄惁瀛樺湪寮傚父锛�</div>
-        <el-radio-group v-model="hasException">
+        <el-radio-group v-model="currentHasException">
           <el-radio :value="false">姝e父</el-radio>
           <el-radio :value="true">瀛樺湪寮傚父</el-radio>
         </el-radio-group>
@@ -135,11 +135,27 @@
 const afterModelValue = ref([]);
 const issueModelValue = ref([]);
 const currentUploadType = ref("before");
-const hasException = ref(null);
+const hasExceptionBefore = ref(null);
+const hasExceptionAfter = ref(null);
+const hasExceptionIssue = ref(null);
 const currentTask = ref(null);
 
 const showVideoDialog = ref(false);
 const currentVideoFile = ref(null);
+
+// 鏍规嵁褰撳墠 Tab 鑾峰彇/璁剧疆瀵瑰簲鐨勫紓甯哥姸鎬�
+const currentHasException = computed({
+  get: () => {
+    if (currentUploadType.value === "before") return hasExceptionBefore.value;
+    if (currentUploadType.value === "after") return hasExceptionAfter.value;
+    return hasExceptionIssue.value;
+  },
+  set: (val) => {
+    if (currentUploadType.value === "before") hasExceptionBefore.value = val;
+    else if (currentUploadType.value === "after") hasExceptionAfter.value = val;
+    else hasExceptionIssue.value = val;
+  }
+});
 
 const uploadConfig = {
   action: "/file/upload",
@@ -148,7 +164,10 @@
   fileType: ["jpg", "jpeg", "png", "gif", "webp", "mp4", "mov", "avi", "wmv"],
 };
 
-const uploadUrl = `${import.meta.env.VITE_APP_BASE_API}${uploadConfig.action}`;
+const uploadUrl = computed(() => {
+  const type = getTabType();
+  return `${import.meta.env.VITE_APP_BASE_API}${uploadConfig.action}?type=${type}`;
+});
 const uploadHeaders = {
   Authorization: `Bearer ${getToken()}`,
 };
@@ -213,7 +232,9 @@
   afterModelValue.value = [];
   issueModelValue.value = [];
   currentUploadType.value = "before";
-  hasException.value = null;
+  hasExceptionBefore.value = null;
+  hasExceptionAfter.value = null;
+  hasExceptionIssue.value = null;
   currentTask.value = null;
   uploadProgress.value = 0;
   uploading.value = false;
@@ -240,8 +261,12 @@
     : [];
 
   currentUploadType.value = "before";
-  hasException.value =
-    typeof rawTask.hasException === "boolean" ? rawTask.hasException : null;
+  hasExceptionBefore.value =
+    typeof rawTask.hasExceptionBefore === "boolean" ? rawTask.hasExceptionBefore : null;
+  hasExceptionAfter.value =
+    typeof rawTask.hasExceptionAfter === "boolean" ? rawTask.hasExceptionAfter : null;
+  hasExceptionIssue.value =
+    typeof rawTask.hasExceptionIssue === "boolean" ? rawTask.hasExceptionIssue : null;
   uploadFileList.value = [];
   showUploadDialog.value = true;
 };
@@ -424,7 +449,9 @@
 
   return {
     ...rest,
-    hasException: hasException.value,
+    hasExceptionBefore: hasExceptionBefore.value,
+    hasExceptionAfter: hasExceptionAfter.value,
+    hasExceptionIssue: hasExceptionIssue.value,
     tempFileIds,
     commonFileListBefore: buildGroupedFiles(beforeModelValue.value),
     commonFileListAfter: buildGroupedFiles(afterModelValue.value),
@@ -433,14 +460,17 @@
 };
 
 const submitUpload = async () => {
-  if (hasException.value === null) {
-    ElMessage.warning("璇烽�夋嫨鏄惁瀛樺湪寮傚父");
+  // 鍙獙璇佸綋鍓� Tab 鐨勫紓甯哥姸鎬�
+  const currentException = currentHasException.value;
+  if (currentException === null) {
+    ElMessage.warning(`璇烽�夋嫨${getUploadTypeText()}鏄惁瀛樺湪寮傚父`);
     return;
   }
 
-  const files = buildSubmitFiles();
-  if (!files.length) {
-    ElMessage.warning("璇峰厛涓婁紶鏂囦欢");
+  const currentFiles = getCurrentFiles();
+  // 鍙湁閫夋嫨"瀛樺湪寮傚父"鏃舵墠闇�瑕佷笂浼犳枃浠�
+  if (currentException === true && !currentFiles.length) {
+    ElMessage.warning(`${getUploadTypeText()}瀛樺湪寮傚父鏃惰涓婁紶鍥剧墖鎴栬棰慲);
     return;
   }
 

--
Gitblit v1.9.3