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) {