From 187947177a455b90b1eb113623cc6ba1a4a4252c Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Thu, 10 Jul 2025 15:19:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E8=AE=B0=E6=B7=BB=E5=8A=A0=E6=88=AA?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customize/CustomizeQuestionFormItem.vue | 20 +++++- .../CustomizeQuestionTableFormItem.vue | 13 ++++ .../reading/dicoms3D/components/ReadPage.vue | 62 ++++++++++++++++--- .../components/Recist/QuestionList.vue | 8 --- .../components/customize/QuestionFormItem.vue | 13 ++++ .../components/customize/QuestionList.vue | 34 ++++++++-- .../customize/QuestionTableFormItem.vue | 21 ++++++- 7 files changed, 144 insertions(+), 27 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 1037ba11..05300cf1 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue @@ -25,7 +25,8 @@ {{ scope.row[item.Id] === '' ? '' : scope.row[item.Id] ? scope.row[item.Id].split('|').length : '' }} - {{!isNaN(parseFloat(scope.row[item.Id])) ? parseFloat(scope.row[item.Id]).toFixed(digitPlaces) : scope.row[item.Id]}} + {{ !isNaN(parseFloat(scope.row[item.Id])) ? parseFloat(scope.row[item.Id]).toFixed(digitPlaces) : + scope.row[item.Id] }} {{ scope.row[item.Id] }} @@ -132,6 +133,9 @@ + + v.RowId === RowId) this.AnswersList.splice(index, 1) - this.$emit('setFormItemData', {key: this.question.Id, val: this.AnswersList, question: this.question}) + this.$emit('setFormItemData', { key: this.question.Id, val: this.AnswersList, question: this.question }) this.formItemNumberChange(this.question.Id, true) } loading.close() @@ -830,7 +834,7 @@ export default { if (isNE) { num = 'NE' } else { - num = num.toFixed(this.digitPlaces) + num = num.toFixed(this.digitPlaces) } this.$set(this.QuestionsForm, v.Id, num.toString()); } @@ -999,6 +1003,16 @@ export default { } } +::v-deep .el-select .el-input__prefix { + left: calc(100% - 50px); + cursor: pointer; +} + +::v-deep .el-select .el-input__inner { + padding-left: 15px; + padding-right: 50px; +} + ::v-deep .el-form-item__label { color: #c3c3c3; } 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 d5e6d8ee..767c26a8 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue @@ -83,6 +83,9 @@ @change="(val) => { formItemNumberChange(val, question) }" :disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"> + + { + const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str) + let picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : '' + params.PicturePath = picturePath + params.MarkTool = measureData.markTool + params.OrderMarkName = measureData.data.label + params.VisitTaskId = this.taskInfo.VisitTaskId + params.StudyId = annotation.studyId + params.SeriesId = annotation.seriesId + params.InstanceId = annotation.instanceId + params.Id = annotation.id ? annotation.id : '' + params.MeasureData = JSON.stringify(measureData) + params.NumberOfFrames = annotation.numberOfFrames + const res = await submitCustomTag(params) + annotation.id = res.Result + }) + } catch (e) { + this.loading = false console.log(e) } }, @@ -3154,6 +3166,38 @@ export default { this.trialCriterion = res.Result }) .catch(() => {}) + }, + async uploadScreenshots(fileName, file) { + try { + file = this.convertBase64ToBlob(file) + const trialId = this.$route.query.trialId + const taskInfo = JSON.parse(localStorage.getItem('taskInfo')) + const subjectId = taskInfo.SubjectId + const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file) + return { isSuccess: true, result: result } + } catch (e) { + console.log(e) + return { isSuccess: false, result: e } + } + }, + convertBase64ToBlob(imageEditorBase64) { + const base64Arr = imageEditorBase64.split(',') + let imgtype = '' + let base64String = '' + if (base64Arr.length > 1) { + base64String = base64Arr[1] + imgtype = base64Arr[0].substring( + base64Arr[0].indexOf(':') + 1, + base64Arr[0].indexOf(';') + ) + } + const bytes = atob(base64String) + const bytesCode = new ArrayBuffer(bytes.length) + const byteArray = new Uint8Array(bytesCode) + for (let i = 0; i < bytes.length; i++) { + byteArray[i] = bytes.charCodeAt(i) + } + return new Blob([bytesCode], { type: imgtype }) }, openUploadImage(status) { const idx = this.visitTaskList.findIndex(i => i.IsCurrentTask) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue index 5ff10701..c5e76b33 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue @@ -1723,7 +1723,6 @@ export default { obj => !obj.RowId ) if (typeof obj === 'object') { - console.log(111) if (this.activeName) { const tableId = this.activeName.split('_')[0] const rowIndex = this.activeName.split('_')[1] @@ -1743,23 +1742,16 @@ export default { return { isCanActiveTool: false, reason: msg } } } else { - console.log(222) if (this.activeName) { - console.log(3333) return this.checkToolCanActive(toolName) } else { - console.log(444, this.isBaseLineTask, toolName) if (this.isBaseLineTask && (toolName === 'Bidirectional' || toolName === 'Length' || toolName === 'RectangleRoi')) { - console.log(555) return { isCanActiveTool: true, reason: '' } } else if (!this.isBaseLineTask && (toolName === 'ArrowAnnotate' || toolName === 'Bidirectional' || toolName === 'Length' || toolName === 'RectangleRoi')) { - console.log(666) return { isCanActiveTool: true, reason: '' } } else if (this.isBaseLineTask && toolName === 'ArrowAnnotate') { - console.log(777) return { isCanActiveTool: false, reason: this.$t('trials:reading:warnning:msg54') } } else { - console.log(888) return { isCanActiveTool: false, reason: '' } } } 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 c9653e8b..98759839 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 @@ -155,6 +155,9 @@ + +