From f371d3ffa56f5cc279d1f9079a909665ccd13b1f Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期日, 16 十一月 2025 10:49:00 +0800
Subject: [PATCH] 详细
---
src/views/archiveManager/index.vue | 108 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 87 insertions(+), 21 deletions(-)
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index 690a203..f19eec4 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -362,9 +362,9 @@
<!-- <el-table-column label="${comment}" align="center" prop="id" /> -->
<el-table-column label="妗f鍙�" align="center" prop="recordId" />
<el-table-column label="鍙戞枃鍙�" align="center" prop="inquiryNumber" />
- <el-table-column label="椤圭洰鍚嶇О" align="center" prop="everyProjectName" />
- <el-table-column label="妗堝嵎棰樺悕" align="center" prop="caseTitle" show-overflow-tooltip />
+
+ <el-table-column label="妗堝嵎棰樺悕" align="center" prop="caseTitle" />
<el-table-column label="鍏紑灞炴��" align="center" prop="publicAttribute" />
<el-table-column label="缂栧埗鍗曚綅" align="center" prop="preparationUnit" />
<el-table-column label="缂栧埗鏃ユ湡" align="center" prop="preparationDate" width="180">
@@ -385,7 +385,7 @@
<el-table-column label="缂╁井鍙�" align="center" prop="microfilmNumber" />
<el-table-column label="澶囨敞" align="center" prop="remarks" />
<el-table-column label="鍘嗗彶鐩稿叧鍙戞枃鍙�" align="center" prop="historicalReferenceNumber" />
-
+<el-table-column label="椤圭洰鍚嶇О" align="center" prop="everyProjectName" />
</el-table>
<pagination
@@ -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="index">
+ <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="index">
+ <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
},
// 琛ㄥ崟鍙傛暟
@@ -1022,7 +1035,7 @@
console.log("1111111333333",response.data)
this.zoneTypeOptions = response.data.data.map(item => ({
value: item.nnumber,
- label: item.name
+ label: item.nnumber
}))
} catch (error) {
console.error('鑾峰彇椤圭洰鍚嶇О鍒楄〃澶辫触:', error)
@@ -1046,7 +1059,7 @@
listAllCategory().then(response => {
this.recordTypeOptions = response.data.map(item => ({
value: item.numb,
- label: item.nname
+ label: item.numb
}))
resolve()
})
@@ -1302,7 +1315,7 @@
handleAuthUser: function(row) {
const roleId = 2
var archiveRecordsId = row.recordId
- alert(roleId)
+
this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId)
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -1336,6 +1349,8 @@
/** 鏌ョ湅骞舵墦鍗癊xcel鏂囦欢 */
viewAndPrintExcel(row) {
const id = row.id || this.ids;
+ // alert(id)
+ this.recordId = id;
this.$modal.loading('姝e湪鑾峰彇Excel鏂囦欢锛岃绋嶅��...');
// 浠庡悗绔幏鍙朎xcel鏂囦欢
@@ -1377,9 +1392,25 @@
/** 澶勭悊棰勮鎸夐挳鐐瑰嚮 */
handlePreviewClick() {
- this.excelLoading = true;
+ 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();
+ // 淇濆瓨鏂囦欢淇℃伅骞舵樉绀洪潤鎬佸脊绐�
+ this.currentExcelUrl = URL.createObjectURL(blob);
+ this.currentExcelBlob = blob;
+ this.currentExcelId = id;
+ this.excelDialogVisible = true;
+ this.excelLoading = false;
+ }).catch(error => {
+ this.$modal.closeLoading();
+ console.error('鑾峰彇Excel鏂囦欢澶辫触:', error);
+ this.$modal.msgError('鑾峰彇Excel鏂囦欢澶辫触锛岃绋嶅悗閲嶈瘯');
+ });
// 閲嶇疆vue-office-excel缁勪欢
if (this.currentExcelUrl) {
const tempUrl = this.currentExcelUrl;
@@ -1602,13 +1633,37 @@
/** 浠庡悗绔幏鍙朎xcel鏂囦欢 */
getExcelFile(id) {
+ var includeQrCode = this.excelOptions.includeQrCode;
+ var urls = `${process.env.VUE_APP_BASE_API}/system/records/recordFileList`+"/"+includeQrCode;
+
+
+ if(this.excelOptions.subselectedSignatures.length!=0)
+ {
+ var selectedSignatures = this.excelOptions.subselectedSignatures
+ urls = urls +'/'+ selectedSignatures
+ }
+ if(this.excelOptions.subselectedAnnotations.length!=0)
+ {
+ var selectedAnnotations = this.excelOptions.subselectedAnnotations
+ urls = urls+"/"+selectedAnnotations
+ }
+
return new Promise((resolve, reject) => {
// 棣栧厛灏濊瘯浣跨敤axios锛堥」鐩凡鏈夌殑HTTP瀹㈡埛绔級
try {
+ // 鑾峰彇鐢ㄦ埛閫夋嫨鐨勬敞瑙�
+ const { selectedAnnotations } = this.excelOptions;
+
+ // 鏋勫缓鍙傛暟锛屽寘鍚敞瑙e唴瀹�
+ const params = {
+ recordId: id,
+
+ };
+
axios({
method: 'Post',
- url: `${process.env.VUE_APP_BASE_API}/system/records/model`,
- params: { id: id },
+ url: urls,
+ params: params,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(response => {
@@ -1629,9 +1684,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