自定义阅片附件下载
parent
8a6a7962ae
commit
cc0b201036
|
@ -794,8 +794,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 预览图片
|
// 预览图片
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
||||||
this.imgVisible = true
|
suffix = suffix ? suffix.toLowerCase() : ''
|
||||||
|
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
||||||
|
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
||||||
|
}else{
|
||||||
|
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
||||||
|
this.imgVisible = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
handleRemove(file, fileList) {
|
handleRemove(file, fileList) {
|
||||||
|
|
|
@ -302,8 +302,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 预览图片
|
// 预览图片
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
||||||
this.imgVisible = true
|
suffix = suffix ? suffix.toLowerCase() : ''
|
||||||
|
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
||||||
|
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
||||||
|
}else{
|
||||||
|
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
||||||
|
this.imgVisible = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
handleRemove(file, fileList) {
|
handleRemove(file, fileList) {
|
||||||
|
|
|
@ -486,8 +486,15 @@ export default {
|
||||||
},
|
},
|
||||||
// 预览图片
|
// 预览图片
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
||||||
this.imgVisible = true
|
suffix = suffix ? suffix.toLowerCase() : ''
|
||||||
|
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
||||||
|
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
||||||
|
}else{
|
||||||
|
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
||||||
|
this.imgVisible = true
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
handleRemove(file, fileList) {
|
handleRemove(file, fileList) {
|
||||||
|
|
|
@ -136,8 +136,14 @@ name: "CustomizeReportPageUpload",
|
||||||
},
|
},
|
||||||
// 预览图片
|
// 预览图片
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
var suffix = file.url.substring(file.url.lastIndexOf(".")+1)
|
||||||
this.imgVisible = true
|
suffix = suffix ? suffix.toLowerCase() : ''
|
||||||
|
if (suffix === 'doc' || suffix === 'docx' || suffix === 'pdf'){
|
||||||
|
window.open(this.OSSclientConfig.basePath + file.url,'_blank')
|
||||||
|
}else{
|
||||||
|
this.imageUrl = this.OSSclientConfig.basePath + file.url
|
||||||
|
this.imgVisible = true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
handleRemove(file, fileList) {
|
handleRemove(file, fileList) {
|
||||||
|
|
Loading…
Reference in New Issue