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 ad45a1f8..54c7f7dd 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -25,6 +25,7 @@ v-if="selectArr.includes(s.VisitTaskId) && s.StudyList.length > 0" :ref="s.VisitTaskId" :visit-task-info="s" + :markedSeriesIds="markedSeriesIds" @activeSeries="activeSeries" /> @@ -573,7 +574,8 @@ export default { lastViewportTaskId: '', digitPlaces: 2, instanceInfo: {}, - lastViewportTaskIds: [] + lastViewportTaskIds: [], + markedSeriesIds: [] } }, computed: { @@ -711,7 +713,16 @@ export default { if (!this.selectArr.includes(item.VisitTaskId)) { this.selectArr.push(item.VisitTaskId) } + if (item.IsCurrentTask) { + this.markedSeriesIds = [] + annotations.map(i=> { + if (i.MeasureData && i.MeasureData.seriesId) { + this.markedSeriesIds.push(i.MeasureData.seriesId) + } + }) + } } + this.visitTaskList.push({ ...item, StudyList: studyList, @@ -1075,7 +1086,6 @@ export default { }) }, addAnnotationListeners() { - console.log(toolsEvents) const debouncedCallback = this.debounce((evt) => { this.annotationModifiedListener(evt) }, 100) @@ -1109,7 +1119,7 @@ export default { console.log(arr) }, annotationAddedListener(e) { - console.log('annotationAddedListener', e) + }, annotationCompletedListener(e) { console.log('Completed') @@ -1128,9 +1138,12 @@ export default { annotation.sliceThickness = series.SliceThickness annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame) annotation.markTool = annotation.metadata.toolName + // this.$refs['ecrf'].setAnnotation({ annotation, toolName: annotation.metadata.toolName }) this.$refs[`ecrf_${this.lastViewportTaskId}`][0].setAnnotation({ annotation, toolName: annotation.metadata.toolName }) + this.markedSeriesIds.push(series.Id) } + this.setToolsPassive() }, annotationModifiedListener(e) { @@ -1147,7 +1160,16 @@ export default { this.setToolsPassive() }, annotationRemovedListener(e) { - + if (this.readingTaskState === 2) return + const { annotation } = e.detail + if (!annotation) return + if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) { + const index = this.markedSeriesIds.indexOf(annotation.seriesId) + if (index !== -1) { + this.markedSeriesIds.splice(index, 1) + } + } + console.log(this.markedSeriesIds) }, removeAnnotation(annotation) { cornerstoneTools.annotation.state.removeAnnotation(annotation.annotationUID) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue index 9ebbed55..94a191f9 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue @@ -48,7 +48,7 @@