From 98dc6beba519d2c1112525bc3a11adf5768789be Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 30 Jul 2025 13:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=A4=96=E5=B1=82?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=B8=8A=E4=BC=A0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/customize/QuestionFormItem.vue | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue index 8abf0462..e7e65db4 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue @@ -1255,18 +1255,22 @@ export default { text: 'Loading', spinner: 'el-icon-loading' }) - var fileName = param.file.name - var index = fileName.lastIndexOf('.') - var suffix = fileName.substring(index + 1, url.length) - let file = await this.fileToBlob(param.file) - // let res = await this.OSSclient.put(`/${this.$route.query.trialId}/Customize/${this.visitTaskId}/${fileName}`, file) - const taskInfo = JSON.parse(localStorage.getItem('taskInfo')) - const subjectId = taskInfo.SubjectId - let res = await this.OSSclient.put(`/${this.$route.query.trialId}/Read/${subjectId}/${this.visitTaskId}/${fileName}`, file) - this.fileList.push({ name: `${this.$t('trials:emailManageCfg:title:fileName')}${this.fileList.length + 1}(${suffix})`, url: this.$getObjectName(res.url) }) - this.urls.push(this.$getObjectName(res.url)) - this.$emit("setFormItemData", { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question }) - this.$set(this.QuestionsForm, this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '') + try { + var fileName = param.file.name + var index = fileName.lastIndexOf('.') + var suffix = fileName.substring(index + 1, fileName.length) + let file = await this.fileToBlob(param.file) + // let res = await this.OSSclient.put(`/${this.$route.query.trialId}/Customize/${this.visitTaskId}/${fileName}`, file) + const taskInfo = JSON.parse(localStorage.getItem('taskInfo')) + const subjectId = taskInfo.SubjectId + let res = await this.OSSclient.put(`/${this.$route.query.trialId}/Read/${subjectId}/${this.visitTaskId}/${fileName}`, file) + this.fileList.push({ name: `${this.$t('trials:emailManageCfg:title:fileName')}${this.fileList.length + 1}(${suffix})`, url: this.$getObjectName(res.url) }) + this.urls.push(this.$getObjectName(res.url)) + this.$emit("setFormItemData", { key: this.question.Id, val: this.urls.length > 0 ? this.urls.join('|') : '', question: this.question }) + this.$set(this.QuestionsForm, this.question.Id, this.urls.length > 0 ? this.urls.join('|') : '') + } catch (err) { + console.log(err) + } loading.close() // uploadReadingAnswerImage(this.$route.query.trialId, this.visitTaskId, formData).then(res => { // if (res.IsSuccess) {