From 89f387786da0e4383cf06ee162526db54971f9cf Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 23 十月 2025 15:21:16 +0800
Subject: [PATCH] fix: s

---
 src/components/commonView/FourStreamsBatchMaterialFileDialog.vue |   41 ++++++++++++++++++++++++++---------------
 1 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/src/components/commonView/FourStreamsBatchMaterialFileDialog.vue b/src/components/commonView/FourStreamsBatchMaterialFileDialog.vue
index 972bc35..ce9d56a 100644
--- a/src/components/commonView/FourStreamsBatchMaterialFileDialog.vue
+++ b/src/components/commonView/FourStreamsBatchMaterialFileDialog.vue
@@ -53,6 +53,8 @@
 } from '@bole-core/components';
 import { format, downloadFileByUrl, formatFileSize } from '@/utils';
 import { downloadWithZip, Message, isFileCanPreview } from '@bole-core/core';
+import { CustomerApplyFileTypeListItem, EnterpriseApplyFileUtils } from './utils';
+import { FourStreamsExtraMaterialFileSearchType, SearchType } from '@/constants';
 
 defineOptions({
   name: 'FourStreamsBatchMaterialFileDialog',
@@ -62,10 +64,13 @@
   name?: string;
   zipName?: string;
   showDeleteBtn?: boolean;
+  showMaterialExtraFileDeleteBtn?: boolean;
+  fileSearchTypeId?: string;
 };
 
 const props = withDefaults(defineProps<Props>(), {
   showDeleteBtn: true,
+  showMaterialExtraFileDeleteBtn: false,
 });
 
 const visible = defineModel<boolean>('visible');
@@ -87,22 +92,22 @@
 ]);
 
 const operationBtns = defineOperationBtns([
-  // {
-  //   data: {
-  //     enCode: 'detailBtn',
-  //     name: '鏌ョ湅',
-  //   },
-  //   emits: {
-  //     onClick: (row) => handlePreview(row),
-  //   },
-  //   extraProps: {
-  //     hide: (row: UploadUserFile) => !isFileCanPreview(row.path),
-  //   },
-  // },
+  {
+    data: {
+      enCode: 'detailBtn',
+      name: '鏌ョ湅',
+    },
+    emits: {
+      onClick: (row) => handlePreview(row),
+    },
+    extraProps: {
+      hide: (row: UploadUserFile) => !isFileCanPreview(row.path),
+    },
+  },
   {
     data: {
       enCode: 'downloadBtn',
-      name: '鏌ョ湅',
+      name: '涓嬭浇',
     },
     emits: {
       onClick: (row) => handleDownload(row),
@@ -120,7 +125,13 @@
       onClick: (row) => handleDelete(row),
     },
     extraProps: {
-      hide: (row) => !props.showDeleteBtn,
+      hide: (row: API.CustomerUploadMonthApplyFileTypeDto) => {
+        if (EnterpriseApplyFileUtils.isApplyUploadExtraFileSearchTypeId(props.fileSearchTypeId)) {
+          return !props.showMaterialExtraFileDeleteBtn;
+        } else {
+          return !props.showDeleteBtn;
+        }
+      },
     },
   },
 ]);
@@ -147,7 +158,7 @@
     const res: UploadUserFile[] = proTable.value.innerTableRef.getSelectionRows();
     if (res.length > 0) {
       downloadWithZip(
-        res.map((item) => ({ data: item.url })),
+        res.map((item) => ({ data: `${item.url}?${new Date().getTime()}` })),
         props.zipName
       );
     } else {

--
Gitblit v1.9.1