diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue index e1c7c3fb..c40d341a 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue @@ -794,8 +794,14 @@ export default { }, // 预览图片 handlePictureCardPreview(file) { - this.imageUrl = this.OSSclientConfig.basePath + file.url - this.imgVisible = true + var suffix = file.url.substring(file.url.lastIndexOf(".")+1) + 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) { diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue index 3afc5595..d6e7223a 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionItem.vue @@ -302,8 +302,14 @@ export default { }, // 预览图片 handlePictureCardPreview(file) { - this.imageUrl = this.OSSclientConfig.basePath + file.url - this.imgVisible = true + var suffix = file.url.substring(file.url.lastIndexOf(".")+1) + 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) { diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue index 91316b09..54122c9b 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue @@ -486,8 +486,15 @@ export default { }, // 预览图片 handlePictureCardPreview(file) { - this.imageUrl = this.OSSclientConfig.basePath + file.url - this.imgVisible = true + var suffix = file.url.substring(file.url.lastIndexOf(".")+1) + 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) { diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPageUpload.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPageUpload.vue index 03ea842a..d53bf99d 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPageUpload.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeReportPageUpload.vue @@ -136,8 +136,14 @@ name: "CustomizeReportPageUpload", }, // 预览图片 handlePictureCardPreview(file) { - this.imageUrl = this.OSSclientConfig.basePath + file.url - this.imgVisible = true + var suffix = file.url.substring(file.url.lastIndexOf(".")+1) + 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) {