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 7007ff78..df3e2b38 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 @@ -590,6 +590,7 @@ export default { // 如果不是当前窗口绑定的标记如何处理? this.setAnswerToQuestion(v) } else { + console.log(v) if (v.length === 1) { const { parentQsId, rowId } = v[0] if (!parentQsId && !rowId) return diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue index f62b3a33..a1ca3eb7 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue @@ -129,6 +129,7 @@ export default { imageToolAttribute: '', questionsMarkStatus: {}, digitPlaces: 2, + questionImageToolAttributeInfo: {} } }, mounted() { @@ -165,6 +166,9 @@ export default { } if (v.Type === 'number') { this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces)) + if (v.ImageToolAttribute) { + this.$set(this.questionImageToolAttributeInfo, v.Id, v.ImageToolAttribute) + } } if (v.Childrens.length > 0) { this.setChild(v.Childrens) @@ -213,6 +217,9 @@ export default { } if (i.Type === 'number') { this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces)) + if (i.ImageToolAttribute) { + this.$set(this.questionImageToolAttributeInfo, i.Id, i.ImageToolAttribute) + } } if (i.Childrens && i.Childrens.length > 0) { this.setChild(i.Childrens) @@ -627,11 +634,10 @@ export default { try { let annotation = null if (!this.operateRowId && obj.rowId && obj.question.ParentQsId) { + this.operateRowId = obj.rowId this.updateQuestionsMarkStatus(obj) - annotation = this.getAnnotationByRow(obj.rowId) - } else if (this.operateRowId && this.operateQuestionId) { - annotation = this.getAnnotationByRow(this.operateRowId) } + annotation = this.getAnnotationByRow(this.operateRowId) // 截图上传 let picturePath = '' if (annotation) { @@ -684,7 +690,6 @@ export default { return this.questionMarkInfoList.findIndex(i => i.QuestionId === Id) }, updateQuestionsMarkStatus(obj) { - this.operateRowId = obj.rowId this.questionMarkInfoList.forEach(item => { if (item.QuestionId === obj.question.ParentQsId && !item.RowId) { item.RowId = obj.rowId @@ -872,11 +877,17 @@ export default { }, setAnswerToQuestion(annotation, questionId) { if (!questionId || !annotation) return - let val = this.getAnnotationProp(annotation, this.imageToolAttribute) + let prop = '' + if (!this.imageToolAttribute) { + prop = this.questionImageToolAttributeInfo[questionId] + } else { + prop = this.imageToolAttribute + } + let val = this.getAnnotationProp(annotation, prop) this.$set(this.questionForm, questionId, val) }, getAnnotationProp(annotation, prop) { - if (!annotation) return + if (!annotation || !prop) return const referencedImageId = annotation?.metadata?.referencedImageId if (!referencedImageId) return null const cacheKey = `imageId:${referencedImageId}`