From 2417a23dc04d04bd422d6f978958e10bf1633548 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期六, 15 十一月 2025 23:44:56 +0800
Subject: [PATCH] 修改代码

---
 src/views/archiveManager/index.vue |   62 ++++++++++++++++++++++++-------
 1 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index 5513c20..ca8a990 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -419,10 +419,11 @@
             <div class="option-group">
               <div class="option-label">閫夋嫨娉ㄨВ:</div>
               <div class="annotation-options">
-                <label v-for="i in 5" :key="i" class="annotation-checkbox">
-                  <input type="checkbox" v-model="excelOptions.selectedAnnotations" :value="i">
-                  <span>娉ㄨВ{{ i }}</span>
-                </label>
+              <label v-for="(annotation, index) in excelOptions.selectedAnnotations" :key="index" class="signature-checkbox">
+                              <input type="checkbox" v-model="excelOptions.subselectedAnnotations" :value="annotation">
+                              <span>{{ annotation }}
+                              </span>
+              </label>
               </div>
             </div>
 
@@ -431,10 +432,13 @@
               <div class="option-label">绛惧悕鏍忚缃�:</div>
               <div class="signature-options">
                 <div class="signature-checkboxes">
-                  <label v-for="i in 3" :key="i" class="signature-checkbox">
-                    <input type="checkbox" v-model="excelOptions.selectedSignatures" :value="i">
-                    <span>绛惧悕鏍弡{ i }}</span>
+                 <label v-for="(signature, index) in excelOptions.selectedSignatures" :key="index" class="signature-checkbox">
+                                 <input type="checkbox" v-model="excelOptions.subselectedSignatures" :value="signature">
+                                 <span>{{ signature }}</span>
                   </label>
+
+
+
                 </div>
 <!--                <p v-if="excelOptions.selectedSignatures.length === 0" class="option-tip">璇烽�夋嫨鑷冲皯涓�涓鍚嶆爮</p> -->
               </div>
@@ -442,7 +446,9 @@
           </div>
         </div>
     <!-- 浼樺寲鐨凟xcel棰勮缁勪欢 -->
-    <div class="excel-preview-wrapper" v-if="excelDialogVisible">
+     <el-dialog class="excel-preview-wrapper" :visible.sync="showExcelPreview" :modal="false" width="80%">
+
+    <div  >
       <!-- 涓昏棰勮缁勪欢 -->
       <vue-office-excel
         v-if="currentExcelUrl"
@@ -464,7 +470,7 @@
         <button class="excel-dialog-btn download-btn" @click="handleDownloadClick">涓嬭浇Excel鏂囦欢</button>
       </div>
     </div>
-
+</el-dialog>
         <div class="excel-dialog-footer">
           <button class="excel-dialog-btn preview-btn" @click="handlePreviewClick">棰勮</button>
           <button class="excel-dialog-btn print-btn" @click="handlePrintClick">鎵撳嵃</button>
@@ -885,8 +891,15 @@
     // Excel閫夐」閰嶇疆
     excelOptions: {
       includeQrCode: false, // 鏄惁鍖呭惈浜岀淮鐮�
-      selectedAnnotations: [], // 閫変腑鐨勬敞瑙e垪琛�
+      selectedAnnotations: ["鏈竻鍗曠敱妗f褰㈡垚閮ㄩ棬瀹屾垚",
+           "鏂囦欢绫诲瀷蹇呴』褰曞叆锛屽寘鎷粨璁烘潗鏂欍�佽繃绋嬫潗鏂欍�佺敵璇锋潗鏂欙紝鍏朵粬鏉愭枡",
+            "鍏紑灞炴�у繀椤诲綍鍏ワ紝涓诲姩鍏紑銆佷緷鐢宠鍏紑銆佸厤浜堝叕寮�",
+             "淇濈鏈熼檺:30骞存垨姘镐箙",
+            "椤靛彿鎸夌収姝e紡褰曞叆椤电爜涓哄噯"], // 閫変腑鐨勬敞瑙e垪琛�
       includeSignature: false, // 鏄惁鍖呭惈绛惧悕鏍�
+            selectedSignatures: ['涓氬姟绉戝绉讳氦浜�:', '瀹℃壒绉戠Щ浜や汉:', '妗f鏁寸悊鍏徃:'], // 閫変腑鐨勭鍚嶆爮鍒楄〃
+            subselectedSignatures: [],
+            subselectedAnnotations: [],
       signaturePosition: 'bottom' // 绛惧悕鏍忎綅缃細top/bottom
     },
       // 琛ㄥ崟鍙傛暟
@@ -1377,7 +1390,7 @@
 
     /** 澶勭悊棰勮鎸夐挳鐐瑰嚮 */
     handlePreviewClick() {
-      this.excelLoading = true;
+      this.showExcelPreview = true;
       this.excelRenderError = '';
 
       // 閲嶇疆vue-office-excel缁勪欢
@@ -1602,13 +1615,23 @@
 
     /** 浠庡悗绔幏鍙朎xcel鏂囦欢 */
     getExcelFile(id) {
+      var includeQrCode = this.excelOptions.includeQrCode;
       return new Promise((resolve, reject) => {
         // 棣栧厛灏濊瘯浣跨敤axios锛堥」鐩凡鏈夌殑HTTP瀹㈡埛绔級
         try {
+          // 鑾峰彇鐢ㄦ埛閫夋嫨鐨勬敞瑙�
+          const { selectedAnnotations } = this.excelOptions;
+
+          // 鏋勫缓鍙傛暟锛屽寘鍚敞瑙e唴瀹�
+          const params = {
+            recordId: id,
+
+          };
+alert(355)
           axios({
             method: 'Post',
-            url: `${process.env.VUE_APP_BASE_API}/system/records/model`,
-            params: { id: id },
+            url: `${process.env.VUE_APP_BASE_API}/system/records/recordFileList`+"/"+includeQrCode,
+            params: params,
             responseType: 'blob',
             headers: { 'Authorization': 'Bearer ' + getToken() }
           }).then(response => {
@@ -1629,9 +1652,20 @@
     fallbackGetExcelFile(id, resolve, reject) {
       try {
         const xhr = new XMLHttpRequest();
+
+        // 鏋勫缓鏌ヨ鍙傛暟锛屽寘鍚敞瑙e唴瀹�
+        const queryParams = new URLSearchParams({
+          id: id,
+          annotation1: "鏈竻鍗曠敱妗f褰㈡垚閮ㄩ棬瀹屾垚",
+          annotation2: "鏂囦欢绫诲瀷蹇呴』褰曞叆锛屽寘鎷粨璁烘潗鏂欍�佽繃绋嬫潗鏂欍�佺敵璇锋潗鏂欙紝鍏朵粬鏉愭枡",
+          annotation3: "鍏紑灞炴�у繀椤诲綍鍏ワ紝涓诲姩鍏紑銆佷緷鐢宠鍏紑銆佸厤浜堝叕寮�",
+          annotation4: "淇濈鏈熼檺:30骞存垨姘镐箙",
+          annotation5: "椤靛彿鎸夌収姝e紡褰曞叆椤电爜涓哄噯"
+        }).toString();
+
         // 灏濊瘯涓嶅悓鐨凙PI璺緞锛屼互閫傚簲鍙兘鐨勫悗绔疄鐜�
         const apiUrls = [
-          `${process.env.VUE_APP_BASE_API}/system/records/model?id=${id}`,
+          `${process.env.VUE_APP_BASE_API}/system/records/model?${queryParams}`,
           `${process.env.VUE_APP_BASE_API}/system/records/model`
         ];
 

--
Gitblit v1.9.1