From 8cd0d74d02af807f8d1b7ca5df5ef6dbe24fd1e9 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 03 Sep 2025 10:44:37 +0800
Subject: [PATCH] feat:样式调整

---
 src/views/resource/components/spotDetails.vue |   52 ++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 36 insertions(+), 16 deletions(-)

diff --git a/src/views/resource/components/spotDetails.vue b/src/views/resource/components/spotDetails.vue
index 6406576..dca0aac 100644
--- a/src/views/resource/components/spotDetails.vue
+++ b/src/views/resource/components/spotDetails.vue
@@ -445,19 +445,35 @@
 
 // 保存
 const handleSave = () => {
-  const fileNameItem = infoList.value.find(item => item.name === '文件名称');
-  const patchTypeItem = infoList.value.find(item => item.name === '图斑类型');
-  const updateParams = {
-    file_name: fileNameItem?.value || '',
-    lot_type_id: patchTypeItem?.value || '',
-    type: patchTypeItem?.value || '',
-    id: props.detailList.id,
-  };
-  patchEditApi(updateParams).then(res => {
-    ElMessage.success(res.data.data);
-    refreshonload();
-    uploadPatchDialog.value = false;
-  });
+ const fileNameItem = infoList.value.find(item => item.name === '文件名称');
+ const patchTypeItem = infoList.value.find(item => item.name === '图斑类型');
+ let lotTypeId;
+ // 检查value是否为数字类型(包括字符串形式的数字)
+ const isValueNumber =
+  !isNaN(Number(patchTypeItem.value)) &&
+  patchTypeItem.value !== '' &&
+  patchTypeItem.value !== null &&
+  patchTypeItem.value !== undefined;
+   console.log('isValueNumber',isValueNumber);
+ if (isValueNumber) {
+  // 转换为数字类型
+  lotTypeId = Number(patchTypeItem.value);
+ } else {
+  // 使用原始值
+  lotTypeId = patchTypeItem.originalValue;
+ }
+ // 构建请求参数
+ const updateParams = {
+  file_name: fileNameItem.value,
+  lot_type_id: lotTypeId,
+  type: lotTypeId,
+  id: props.detailList.id,
+ };
+ patchEditApi(updateParams).then(res => {
+  ElMessage.success(res.data.data);
+  refreshonload();
+  uploadPatchDialog.value = false;
+ });
 };
 // 取消
 const handleCancel = () => {
@@ -600,11 +616,11 @@
   top: 0;
   left: 0;
   height: 99%;
-  z-index: 999;
+  z-index: 99;
   width: 277px;
   overflow: hidden;
   background: rgba(0, 0, 0, 0.4);
-  backdrop-filter: blur(5px);
+  // backdrop-filter: blur(5px);
   border-radius: 8px 8px 8px 8px;
   padding: 6px 10px 0 10px;
   display: flex;
@@ -691,6 +707,7 @@
   .operationspan:first-child {
     margin-right: 10px;
   }
+  
   // 分页
   :deep(.pagination-container) {
     background: transparent !important;
@@ -733,7 +750,10 @@
      box-sizing: border-box
   }
 }
-
+:deep(.el-tooltip__popper) {
+  z-index: 9999 !important;
+  max-width: 300px;
+}
 .el-table {
   flex: 1; 
   overflow: auto;

--
Gitblit v1.9.3