From cc0b201036035d69c704283c1167bc8104536f23 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 26 Apr 2024 17:39:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=98=85=E7=89=87?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicoms/customize/CustomizeQuestionFormItem.vue | 10 ++++++++-- .../dicoms/customize/CustomizeQuestionItem.vue | 10 ++++++++-- .../customize/CustomizeQuestionTableFormItem.vue | 11 +++++++++-- .../dicoms/customize/CustomizeReportPageUpload.vue | 10 ++++++++-- 4 files changed, 33 insertions(+), 8 deletions(-) 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) {