From e81f448084ab4f340860598498f035df23a9d014 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期二, 20 一月 2026 12:46:42 +0800
Subject: [PATCH] 修改了相关代码
---
src/views/archiveDoublePdf/index.vue | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/views/archiveDoublePdf/index.vue b/src/views/archiveDoublePdf/index.vue
index c5b58dc..1dbb4ae 100644
--- a/src/views/archiveDoublePdf/index.vue
+++ b/src/views/archiveDoublePdf/index.vue
@@ -21,12 +21,12 @@
<div class="el-upload__tip" slot="tip">鏀寔鍗曚釜鎴栨壒閲忎笂浼狅紝璇烽�夋嫨PDF鏂囦欢</div>
</el-upload>
</div>
-
+
<!-- 涓嬭浇鎸夐挳鍖哄煙 - 涓婁紶鍓嶇鐢紝涓婁紶鍚庡彲鐢� -->
<div class="download-container" style="white-space: nowrap;">
- <el-button
- type="primary"
- icon="el-icon-download"
+ <el-button
+ type="primary"
+ icon="el-icon-download"
@click="downloadFile"
:disabled="!canDownload"
>
@@ -43,9 +43,9 @@
</a>
</div>
<div>
- <el-button
- type="text"
- icon="el-icon-copy-document"
+ <el-button
+ type="text"
+ icon="el-icon-copy-document"
@click="copyLink"
size="small"
>
@@ -62,7 +62,7 @@
import { getToken } from '@/utils/auth'
import { getPdfFile } from '@/api/system/dpdf'
export default {
- name: "DoublePdf",
+ name: "Pdf",
data() {
return {
fid: '',
@@ -123,22 +123,22 @@
getList() {
this.loading = true
},
-
+
/** 涓婁紶鍓嶆鏌� */
beforeUpload(file) {
const isPdf = file.type === 'application/pdf'
const isLt50M = file.size / 1024 / 1024 < 50
-
+
if (!isPdf) {
this.$message.error('涓婁紶鏂囦欢鍙兘鏄� PDF 鏍煎紡!')
}
if (!isLt50M) {
this.$message.error('涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃 50MB!')
}
-
+
return isPdf && isLt50M
},
-
+
/** 涓婁紶鎴愬姛澶勭悊 */
handleUploadSuccess(response) {
console.log(response)
@@ -157,7 +157,7 @@
this.$message.error(response.msg || '涓婁紶澶辫触')
}
},
-
+
/** 鑾峰彇涓嬭浇閾炬帴 */
downloadFile() {
// 鍙戣捣ajax璇锋眰鑾峰彇涓嬭浇閾炬帴
@@ -183,7 +183,7 @@
this.$message.error('鑾峰彇涓嬭浇閾炬帴澶辫触锛岃閲嶈瘯')
})
},
-
+
/** 澶嶅埗閾炬帴鍒板壀璐存澘 */
copyLink() {
if (this.displayedDownloadLink) {
@@ -194,7 +194,7 @@
textarea.style.opacity = '0'
document.body.appendChild(textarea)
textarea.select()
-
+
try {
document.execCommand('copy')
this.$message.success('閾炬帴宸插鍒跺埌鍓创鏉�')
@@ -206,7 +206,7 @@
}
}
},
-
+
/** 涓婁紶澶辫触澶勭悊 */
handleUploadError(err) {
this.$message.error('涓婁紶澶辫触锛岃閲嶈瘯')
--
Gitblit v1.9.1