From 3a597ff321125e83de645f034f43655539999e21 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期一, 17 十一月 2025 11:50:17 +0800
Subject: [PATCH] 修改了对应代码

---
 src/views/archiveManager/index.vue |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index f19eec4..0a0a9a4 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -300,7 +300,7 @@
                   icon="el-icon-edit"
                   @click="handleInfo(scope.row)"
                   v-hasPermi="['system:records:edit']"
-                >妗堝嵎璇︾粏淇℃伅</el-button>
+                >缂栬緫鍗峰唴鐩綍</el-button>
 
                 <el-button
                   size="mini"
@@ -446,9 +446,8 @@
           </div>
         </div>
     <!-- 浼樺寲鐨凟xcel棰勮缁勪欢 -->
-     <el-dialog class="excel-preview-wrapper" :visible.sync="showExcelPreview" :modal="false" width="80%">
-
-    <div  >
+     <el-dialog class="excel-preview-wrapper" :visible.sync="showExcelPreview" :modal="false" width="80%" :show-close="true" @click="closeExcelPreviewDialog">
+    <div  @click.stop>
       <!-- 涓昏棰勮缁勪欢 -->
       <vue-office-excel
         v-if="currentExcelUrl"
@@ -808,6 +807,7 @@
   name: "Records",
   data() {
     return {
+      showExcelPreview: false,
                   excel: 'http://localhost:8080/profile/upload/12.xls', //璁剧疆鏂囨。缃戠粶鍦板潃锛屽彲浠ユ槸鐩稿鍦板潃
 
       open_check: false,
@@ -1379,6 +1379,7 @@
     /** 鍏抽棴Excel寮圭獥骞舵竻鐞嗚祫婧� */
     closeExcelDialog() {
       this.excelDialogVisible = false;
+    //  alert(this.excelDialogVisible)
       if (this.excelPreviewTimeout) {
         clearTimeout(this.excelPreviewTimeout);
         this.excelPreviewTimeout = null;
@@ -1389,14 +1390,18 @@
       }
       this.currentExcelBlob = null;
     },
+closeExcelPreviewDialog()
+{
 
+  this.showExcelPreview = false;
+},
     /** 澶勭悊棰勮鎸夐挳鐐瑰嚮 */
     handlePreviewClick() {
       this.showExcelPreview = true;
       this.excelRenderError = '';
       var id = this.recordId ;
       this.$modal.loading('姝e湪鑾峰彇Excel鏂囦欢锛岃绋嶅��...');
-      alert(id)
+
       // 浠庡悗绔幏鍙朎xcel鏂囦欢
       this.getExcelFile(id).then(blob => {
         this.$modal.closeLoading();
@@ -1580,9 +1585,9 @@
         // 鏋勫缓鏂囦欢鍚嶏紝鍖呭惈閫夐」淇℃伅
         let filename = `record_${this.currentExcelId}`;
         if (includeQrCode) filename += '_qr';
-        if (selectedAnnotations.length > 0) {
-          filename += `_anno${selectedAnnotations.join('')}`;
-        }
+        // if (selectedAnnotations.length > 0) {
+        //   filename += `_anno${selectedAnnotations.join('')}`;
+        // }
         filename += `_${new Date().getTime()}.xlsx`;
 
         link.download = filename;
@@ -1618,7 +1623,7 @@
       });
     },
 
-    /** 娓呯悊Excel棰勮鐩稿叧璧勬簮 */
+    /** 娓呯悊Excel棰勮鐩稿叧璧勬簮骞跺叧闂璇濇 */
     cleanupExcelPreview(iframe, url) {
       setTimeout(() => {
         if (iframe && iframe.parentNode) {
@@ -1628,6 +1633,7 @@
           URL.revokeObjectURL(url);
         }
         this.excelRenderError = '';
+        this.showExcelPreview = false; // 鍏抽棴棰勮瀵硅瘽妗�
       }, 1000);
     },
 

--
Gitblit v1.9.1