From e47bc9e53ed3d64016c1e0db67d280e63b367e07 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期五, 21 八月 2026 17:05:54 +0800
Subject: [PATCH] 导入模板下载 导入 计算迟到加班早退

---
 src/views/mes/md/item/modules/product-media-list.vue |   31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/src/views/mes/md/item/modules/product-media-list.vue b/src/views/mes/md/item/modules/product-media-list.vue
index 1f58cda..06563c7 100644
--- a/src/views/mes/md/item/modules/product-media-list.vue
+++ b/src/views/mes/md/item/modules/product-media-list.vue
@@ -48,7 +48,20 @@
 );
 
 const isReadOnly = computed(() => props.formType === 'detail'); // 鏄惁鍙
-const title = computed(() => props.kind); // 褰撳墠濯掍綋绫诲瀷鏍囬
+const title = computed(() =>
+  props.kind === 'SIP' ? '妫�楠屾寚瀵间功(SIP)' : '浣滀笟鎸囧涔�(SOP)',
+);
+
+/** 灏嗗畬鏁� URL 杞负鐩稿璺緞锛岀‘淇濊蛋鍓嶇浠g悊 */
+function resolveImageUrl(url?: string): string {
+  if (!url) return '';
+  try {
+    const { pathname } = new URL(url, window.location.origin);
+    return pathname;
+  } catch {
+    return url;
+  }
+}
 const loading = ref(false); // SIP/SOP 鍒楄〃鍔犺浇涓�
 const formOpen = ref(false); // SIP/SOP 琛ㄥ崟鏄惁鎵撳紑
 const formLoading = ref(false); // SIP/SOP 琛ㄥ崟鎻愪氦涓�
@@ -114,7 +127,6 @@
       label: '鍥剧墖',
       component: markRaw(ImageUpload),
       componentProps: {
-        maxNumber: 1,
         showDescription: false,
       },
     },
@@ -219,27 +231,28 @@
       娣诲姞 {{ title }}
     </Button>
     <Spin :spinning="loading">
-      <div v-if="list.length > 0" class="grid grid-cols-4 gap-3">
+      <div v-if="list.length > 0" class="grid grid-cols-8 gap-1">
         <Card
           v-for="item in list"
           :key="item.id"
           hoverable
+          class="!w-[120px]"
           :body-style="{ padding: '0px' }"
         >
           <Image
             v-if="item.url"
-            :src="item.url"
-            class="block h-40 w-full object-cover"
-            :preview="{ src: item.url }"
+            :src="resolveImageUrl(item.url)"
+            class="block !h-[90px] !w-[120px] object-cover"
+            :preview="{ src: resolveImageUrl(item.url) }"
           />
           <div
             v-else
-            class="flex h-40 w-full items-center justify-center bg-gray-100 text-gray-400"
+            class="flex !h-[90px] !w-[120px] items-center justify-center bg-gray-100 text-gray-400"
           >
             鏆傛棤鍥剧墖
           </div>
-          <div class="p-3">
-            <div class="mb-1 truncate text-sm font-bold">{{ item.title }}</div>
+          <div class="p-2">
+            <div class="mb-1 truncate text-xs font-bold">{{ item.title }}</div>
             <div v-if="item.description" class="truncate text-xs text-gray-500">
               {{ item.description }}
             </div>

--
Gitblit v1.9.3