diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index 5c8cbd8b..78b24879 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -595,7 +595,7 @@ const { createCameraPositionSynchronizer, createVOISynchronizer } = synchronizer const newStyles = { global: { color: 'rgb(255, 0, 0)', - colorHighlighted: 'rgb(255, 0, 0)', + colorHighlighted: 'rgb(0, 255, 0)', colorSelected: 'rgb(255, 0, 0)', colorLocked: 'rgb(255, 0, 0)', lineWidth: '1', @@ -605,7 +605,7 @@ const newStyles = { textBoxFontFamily: 'Helvetica Neue, Helvetica, Arial, sans-serif', textBoxFontSize: '14px', textBoxColor: 'rgb(255, 0, 0)', - textBoxColorHighlighted: 'rgb(255, 0, 0)', + textBoxColorHighlighted: 'rgb(0, 255, 0)', textBoxColorSelected: 'rgb(255, 0, 0)', textBoxColorLocked: 'rgb(255, 0, 0)', textBoxBackground: '', @@ -1328,6 +1328,11 @@ export default { toolsEvents.ANNOTATION_REMOVED, this.criterionType === 0 ? this.customAnnotationRemovedListener : this.annotationRemovedListener ) + eventTarget.addEventListener( + toolsEvents.ANNOTATION_SELECTION_CHANGE, + this.criterionType === 0 ? this.customAnnotationSelectionChangeListener : this.annotationSelectionChangeListener + ) + // eventTarget.addEventListener( // toolsEvents.ANNOTATION_ADDED, // this.annotationAddedListener @@ -1427,8 +1432,9 @@ export default { annotation.data.text = markName } this.saveCustomAnnotation(annotation) + this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation) } - this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation) + } this.setToolsPassive() @@ -1485,6 +1491,14 @@ export default { // 临时标记 return } + if (annotation.visitTaskId === this.taskInfo.VisitTaskId) { + let isBound = this.$refs[`ecrf_${annotation.visitTaskId}`][0].verifyAnnotationIsBound(annotation) + if (isBound) { + this.$alert('该标记已与问题进行绑定,不允许删除!') + throw 'annotation Not allowed to operate' + } + } + if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) { if (this.activeTool === 'Eraser') { await this.$confirm( @@ -1529,6 +1543,20 @@ export default { viewport.render() } }, + customAnnotationSelectionChangeListener(e) { + if (this.readingTaskState === 2) return + const {detail} = e + const annotations = cornerstoneTools.annotation.state.getAllAnnotations() + const i = annotations.findIndex(i => i.annotationUID === detail.selection[0]) + if (i > -1) { + if (annotations[i].visitTaskId !== this.taskInfo.VisitTaskId) { + return + } else { + this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotations[i]) + } + } + }, + annotationSelectionChangeListener(e) {}, async getAnnotations(visitTaskId) { if (this.readingTaskState === 2) return const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId) 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 22c6e7b1..b6b2805d 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 @@ -241,43 +241,43 @@ - + - + - + - + - +