From 049da9fa009920fc4decc99dd2b3ae429ca6e339 Mon Sep 17 00:00:00 2001
From: buaixuexideshitongxue <2936013465@qq.com>
Date: Sun, 4 Jan 2026 18:11:18 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E8=AE=A1=E9=A2=84=E8=AD=A6=E7=9B=91?=
=?UTF-8?q?=E7=9D=A3--=E9=99=84=E4=BB=B6=E5=8F=98=E5=9B=9E=E5=8F=AF?=
=?UTF-8?q?=E5=9C=A8=E7=BA=BF=E9=A2=84=E8=A7=88=E3=80=81=E7=BB=99=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E5=8A=A0=E4=B8=8A=E9=99=84=E4=BB=B6=E9=A2=84=E8=A7=88?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/file/list.vue | 79 ++++++++++++++------------
src/views/report/edit/controlPrice.vue | 10 ++++
2 files changed, 53 insertions(+), 36 deletions(-)
diff --git a/src/components/file/list.vue b/src/components/file/list.vue
index a1f76b2..168fae8 100644
--- a/src/components/file/list.vue
+++ b/src/components/file/list.vue
@@ -258,48 +258,55 @@ let initialY = 0;
const fileRrror = ref(false);
const tableDatas = ref([])
function filePreview(file) {
- if (!file?.filePath) {
- ElMessage?.warning?.('文件路径不存在,无法下载')
- return
- }
- const url = `${BASE_PATH}/file/stream/${file.filePath}`
- const type = getFileType(file.fileName)
- // 1. PDF:新窗口打开
- if (type === FileType.PDF) {
- window.open(url, '_blank')
- return
- }
-// 2. Word / Excel:直接下载(不打开窗口)
- if (
- type === FileType.WORD ||
- type === FileType.EXCEL
- ) {
- const a = document.createElement('a')
- a.href = url
- a.download = file.fileName || ''
- document.body.appendChild(a)
- a.click()
- document.body.removeChild(a)
- return
- }
-
- // 3. 其他类型:默认直接下载
- const a = document.createElement('a')
- a.href = url
- a.download = file.fileName || ''
- document.body.appendChild(a)
- a.click()
- document.body.removeChild(a)
-
- activeIndex.value = index;
- activeFile.value = file;
- console.log(activeFile.value)
preview.value = true;
+ activeFile.value = file;
rotate.value = 0;
scale.value = 1;
translateX.value = 0;
translateY.value = 0;
moveFlag = false;
+// if (!file?.filePath) {
+// ElMessage?.warning?.('文件路径不存在,无法下载')
+// return
+// }
+// const url = `${BASE_PATH}/file/stream/${file.filePath}`
+// const type = getFileType(file.fileName)
+// // 1. PDF:新窗口打开
+// if (type === FileType.PDF) {
+// window.open(url, '_blank')
+// return
+// }
+// // 2. Word / Excel:直接下载(不打开窗口)
+// if (
+// type === FileType.WORD ||
+// type === FileType.EXCEL
+// ) {
+// const a = document.createElement('a')
+// a.href = url
+// a.download = file.fileName || ''
+// document.body.appendChild(a)
+// a.click()
+// document.body.removeChild(a)
+// return
+// }
+//
+// // 3. 其他类型:默认直接下载
+// const a = document.createElement('a')
+// a.href = url
+// a.download = file.fileName || ''
+// document.body.appendChild(a)
+// a.click()
+// document.body.removeChild(a)
+//
+// activeIndex.value = index;
+// activeFile.value = file;
+// console.log(activeFile.value)
+// preview.value = true;
+// rotate.value = 0;
+// scale.value = 1;
+// translateX.value = 0;
+// translateY.value = 0;
+// moveFlag = false;
}
diff --git a/src/views/report/edit/controlPrice.vue b/src/views/report/edit/controlPrice.vue
index e6c7569..ec24b60 100644
--- a/src/views/report/edit/controlPrice.vue
+++ b/src/views/report/edit/controlPrice.vue
@@ -1304,6 +1304,16 @@ function hasAuditAttachment() {