|
|
|
@ -238,6 +238,7 @@ |
|
|
|
<a type="primary" size="small" v-if="scope.row.uploadedFlag !== '已上传'" |
|
|
|
@click="copyFile(scope.row)">复制</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.uploadedFlag !== '已上传'" @click="warnSendMail(scope.row)">提醒</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.uploadedFlag == '已上传'" @click="selectFileDataList(scope.row)">查看附件</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -365,6 +366,50 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="查看附件" :visible.sync="viewMassDocumentFileVisible" width="770px" style="margin-top: 0vh" :close-on-click-modal="false"> |
|
|
|
<el-table |
|
|
|
:height="height - 100" |
|
|
|
:data="fileDataList" |
|
|
|
border |
|
|
|
style="width: 100%;margin-top: 0px;margin-left: 0px;"> |
|
|
|
<el-table-column |
|
|
|
prop="fileName" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="250" |
|
|
|
label="文件名"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createDate" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="80" |
|
|
|
label="上传时间"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="createdBy" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="50" |
|
|
|
label="上传人"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="viewFile(scope.row)">查看</a> |
|
|
|
<a type="text" size="small" @click="downloadFile(scope.row)">下载</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div slot="footer" class="dialog-footer" style="margin-top: 0px"> |
|
|
|
<el-button @click="viewMassDocumentFileVisible = false">关闭</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -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, |
|
|
|
|