From aa5cb781434a61bc92f0915109ec2f2f699138c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=AE=8F=E6=96=8C?= <2164406372@qq.com>
Date: Fri, 5 Dec 2025 16:46:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A2=84=E8=A7=88=E9=99=84?=
=?UTF-8?q?=E4=BB=B6=E5=92=8C=E4=B8=8B=E8=BD=BD=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/eamProject.js | 3 +
.../modules/eam/eamProjectInfoForUploads.vue | 94 ++++++++++++++++++-
2 files changed, 96 insertions(+), 1 deletion(-)
diff --git a/src/api/eam/eamProject.js b/src/api/eam/eamProject.js
index aa35ad5..fe6021b 100644
--- a/src/api/eam/eamProject.js
+++ b/src/api/eam/eamProject.js
@@ -39,3 +39,6 @@ export const saveHandle= data => createAPI(`/pms/eamProject/saveHandle`,'post',d
export const searchMassProductionBomList= data => createAPI(`/pms/eamProject/searchMassProductionBomList`,'post',data)
export const searchRoutingList= data => createAPI(`/pms/eamProject/searchRoutingList`,'post',data)
+
+export const selectFileDataList= data => createAPI(`/pms/eamProject/selectFileDataList`,'post',data)
+export const previewEamProjectInfoForUploadFile = data => createAPI(`/pms/eamProject/previewEamProjectInfoForUploadFile`,'post',data,'download')
diff --git a/src/views/modules/eam/eamProjectInfoForUploads.vue b/src/views/modules/eam/eamProjectInfoForUploads.vue
index 2c93fb0..29e9a89 100644
--- a/src/views/modules/eam/eamProjectInfoForUploads.vue
+++ b/src/views/modules/eam/eamProjectInfoForUploads.vue
@@ -238,6 +238,7 @@
复制
提醒
+ 查看附件
@@ -365,6 +366,50 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+ 下载
+
+
+
+
+
+
@@ -383,7 +428,12 @@ import {
queryProjectUploadsDocumentList,
queryAllProjectUploadsDocumentList, deleteProofDocument, getCopyDocumentFileList, copyDocumentFileToDoc
} from "../../../api/eam/eamProofing";
-import {searchConfirmProgressPusherList, warnSendMailHandle} from "../../../api/eam/eamProject";
+import {
+ previewEamProjectInfoForUploadFile,
+ searchConfirmProgressPusherList,
+ searchProjectConfirmatorFileList, selectFileDataList,
+ warnSendMailHandle
+} from "../../../api/eam/eamProject";
import {getSiteAndBuByUserName} from "../../../api/qc/qc";
import {removeUserFavorite, saveUserFavorite, userFavoriteList} from "../../../api/userFavorite";
import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table";
@@ -434,6 +484,8 @@ export default {
confirmProgressList: [],
projectPartDocumentList: [],
allPersonnelInfoList: [],
+ fileDataList: [],
+ viewMassDocumentFileVisible: false,
height: 200,
pageIndex: 1,
pageSize: 20,
@@ -3197,6 +3249,46 @@ export default {
});
},
+ selectFileDataList(row){
+ selectFileDataList(row).then(({data}) => {
+ if (data && data.code === 0){
+ this.fileDataList = data.list;
+ }
+ })
+ this.viewMassDocumentFileVisible = true
+ },
+
+ viewFile(row){
+ previewEamProjectInfoForUploadFile(row).then(({data}) => {
+ let type = 'application/pdf;charset=UTF-8'
+ const blob = new Blob([data], { type: type })
+ console.log(blob,type)
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob)
+ // 在新标签页中打开文件预览
+ window.open(fileURL, '_blank')
+ })
+ },
+
+ downloadFile (row) {
+ previewEamProjectInfoForUploadFile(row)
+ .then(({data}) => {
+ // 不限制文件下载类型
+ const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
+ // 下载文件名称
+ const fileName = row.fileName
+ // a标签下载
+ const linkNode = document.createElement('a')
+ linkNode.download = fileName // a标签的download属性规定下载文件的名称
+ linkNode.style.display = 'none'
+ linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
+ document.body.appendChild(linkNode)
+ linkNode.click() // 模拟在按钮上的一次鼠标单击
+ URL.revokeObjectURL(linkNode.href) // 释放URL 对象
+ document.body.removeChild(linkNode)
+ })
+ },
+
copyFile (row) {
this.copyModalData = {
...row,