|
@@ -263,13 +263,19 @@ export default {
|
|
|
|
|
|
handlePreviewAttachment(row) {
|
|
|
// // 预览文件
|
|
|
- let href;
|
|
|
if(row.Url.endsWith('.doc') || row.Url.endsWith('.docx')||row.Url.endsWith('.xlsx')){
|
|
|
- href = 'https://view.officeapps.live.com/op/view.aspx?src='+row.Url
|
|
|
+ const href = 'https://view.officeapps.live.com/op/view.aspx?src='+row.Url
|
|
|
+ window.open(href, "_blank")
|
|
|
+ }else if(row.Url.endsWith('.pdf')){
|
|
|
+ // href=row.Url
|
|
|
+ let { href } = this.$router.resolve({
|
|
|
+ path: "/previewOfficeFile",
|
|
|
+ query: { file: encodeURIComponent(row.Url)},
|
|
|
+ });
|
|
|
+ window.open(href, "_blank");
|
|
|
}else{
|
|
|
- href=row.Url
|
|
|
+ window.open(row.Url, "_blank");
|
|
|
}
|
|
|
- window.open(href, "_blank")
|
|
|
},
|
|
|
|
|
|
formatSize(size) {
|