From 1904e70733f763109cb8e81823dad5055a8b4a0f Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 24 十月 2025 15:02:09 +0800
Subject: [PATCH] fix: s

---
 src/components/Table/PortraitTableWithAttachment.vue |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/src/components/Table/PortraitTableWithAttachment.vue b/src/components/Table/PortraitTableWithAttachment.vue
index cefb234..1e371c3 100644
--- a/src/components/Table/PortraitTableWithAttachment.vue
+++ b/src/components/Table/PortraitTableWithAttachment.vue
@@ -1,4 +1,5 @@
 <template>
+  <slot name="title"></slot>
   <PortraitTable v-bind="portraitTableProps" :label-width="labelWidth"> </PortraitTable>
   <div class="enclosure-list-title">闄勪欢鍒楄〃</div>
   <ProTableV2
@@ -18,7 +19,7 @@
 <script setup lang="ts" generic="TAnnexItem">
 import { downloadFileByUrl } from '@bole-core/core';
 import { CommonAnnexTableColumns } from '@/constants';
-import { ProTableV2, ProTableV2Props } from '@bole-core/components';
+import { bolePreview, ProTableV2, ProTableV2Props } from '@bole-core/components';
 
 defineOptions({
   name: 'PortraitTableWithAttachment',
@@ -42,6 +43,15 @@
 const operationListBtns = [
   {
     data: {
+      enCode: 'previewBtn',
+      name: '鏌ョ湅',
+    },
+    emits: {
+      onClick: (row) => handlePreview(row),
+    },
+  },
+  {
+    data: {
       enCode: 'downloadBtn',
       name: '涓嬭浇',
     },
@@ -58,6 +68,12 @@
     downloadFileByUrl(row[props.downloadFileKey] as any);
   }
 }
+
+function handlePreview(row: TAnnexItem) {
+  bolePreview({
+    fileUrl: row[props.downloadFileKey] as any,
+  });
+}
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.1