|
|
|
@ -253,10 +253,11 @@ |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50" |
|
|
|
width="80" |
|
|
|
:label="buttons.operating"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a @click="fileDownload(scope.row)">{{ buttons.fileDownload }}</a> |
|
|
|
<a @click="filePreview(scope.row)">{{ buttons.preview }}</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -295,6 +296,50 @@ |
|
|
|
</el-table> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="预览" :visible.sync="pdfVisible" center width="60%" > |
|
|
|
|
|
|
|
<iframe :src="this.pdfUrl" frameborder="0" width="100%" height="400px"></iframe> |
|
|
|
<!-- <div class="pdf">--> |
|
|
|
<!-- <div class="pdf-tab">--> |
|
|
|
<!-- <span--> |
|
|
|
<!-- class="btn-def btn-pre"--> |
|
|
|
<!-- @click.stop="prePage">上一页</span>--> |
|
|
|
<!-- <span--> |
|
|
|
<!-- class="btn-def btn-next"--> |
|
|
|
<!-- @click.stop="nextPage">下一页</span>--> |
|
|
|
<!-- <span--> |
|
|
|
<!-- class="btn-def"--> |
|
|
|
<!-- @click.stop="clock">顺时针</span>--> |
|
|
|
<!-- <span--> |
|
|
|
<!-- class="btn-def"--> |
|
|
|
<!-- @click.stop="counterClock">逆时针</span>--> |
|
|
|
<!-- <span--> |
|
|
|
<!-- class="btn-def"--> |
|
|
|
<!-- @click.stop="pdfPrintAll">全部打印</span>--> |
|
|
|
<!-- <span--> |
|
|
|
<!-- class="btn-def"--> |
|
|
|
<!-- @click.stop="pdfPrint">部分打印</span>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- <pdf--> |
|
|
|
<!-- ref="pdf"--> |
|
|
|
<!-- :src="this.pdfUrl"--> |
|
|
|
<!-- :page="pageNum"--> |
|
|
|
<!-- :rotate="pageRotate"--> |
|
|
|
<!-- @password="password"--> |
|
|
|
<!-- @progress="loadedRatio = $event"--> |
|
|
|
<!-- @page-loaded="pageLoaded($event)"--> |
|
|
|
<!-- @num-pages="pageTotalNum=$event"--> |
|
|
|
<!-- @error="pdfError($event)"--> |
|
|
|
<!-- @link-clicked="page = $event">--> |
|
|
|
<!-- </pdf>--> |
|
|
|
<!--<!– <div>{{pageNum}}/{{pageTotalNum}}</div>–>--> |
|
|
|
<!--<!– <div>进度:{{loadedRatio}}</div>–>--> |
|
|
|
<!--<!– <div>页面加载成功: {{curPageNum}}</div>–>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -328,6 +373,7 @@ import { |
|
|
|
updatePRHeaderAuthorizeFlag, |
|
|
|
downFtpFile, |
|
|
|
getFileList, |
|
|
|
getPartFamilyList, |
|
|
|
} from '@/api/purchaseorder/purchaseRequisition.js' |
|
|
|
import upload from "../common/upload"; |
|
|
|
import axios from "axios"; |
|
|
|
@ -399,6 +445,7 @@ export default { |
|
|
|
// 是否收藏 |
|
|
|
favorite: false, |
|
|
|
addLanguage: false, |
|
|
|
pdfVisible : false, |
|
|
|
functionId: 2001, |
|
|
|
tableId: "common1001", |
|
|
|
value1: true, |
|
|
|
@ -909,6 +956,7 @@ export default { |
|
|
|
close: '关闭', |
|
|
|
fileDownload: '下载', |
|
|
|
reapply: '重新申请', |
|
|
|
preview: '预览', |
|
|
|
}, |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
@ -1056,13 +1104,22 @@ export default { |
|
|
|
const linkNode = document.createElement('a') |
|
|
|
linkNode.download = fileName // a标签的download属性规定下载文件的名称 |
|
|
|
linkNode.style.display = 'none' |
|
|
|
linkNode.href = window.URL.createObjectURL(blob) // 生成一个Blob URL |
|
|
|
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL |
|
|
|
// if(val == 'Y'){ |
|
|
|
// this.pdfVisible = true |
|
|
|
// this.pdfUrl = linkNode.href |
|
|
|
// }else { |
|
|
|
document.body.appendChild(linkNode) |
|
|
|
linkNode.click() // 模拟在按钮上的一次鼠标单击 |
|
|
|
URL.revokeObjectURL(linkNode.href) // 释放URL 对象 |
|
|
|
document.body.removeChild(linkNode) |
|
|
|
// } |
|
|
|
}) |
|
|
|
}, |
|
|
|
filePreview(row){ |
|
|
|
this.pdfVisible = true |
|
|
|
this.pdfUrl= 'http://192.168.1.2:9002/file/'+row.newFileName |
|
|
|
}, |
|
|
|
childByValue(childValue) { |
|
|
|
// childValue就是子组件传过来的值 |
|
|
|
this.fileList.push(childValue) |
|
|
|
|