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 1f33dd0f..24302265 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -280,11 +280,11 @@ > - +
@@ -1510,14 +1510,32 @@ 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) + try{ + if (!annotation) return + if (this. readingTaskState === 2 && !annotation.data.label) return false + if (this.readingTaskState === 2) { + const errorMsg = { message: 'annotation Not allowed to operate' } + throw errorMsg } + if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) { + const index = this.markedSeriesIds.indexOf(annotation.seriesId) + if (index !== -1) { + this.markedSeriesIds.splice(index, 1) + } + } else { + const errorMsg = { message: 'annotation Not allowed to operate' } + throw errorMsg + } + } catch (e) { + cornerstoneTools.annotation.state.addAnnotation(annotation) + const renderingEngine = getRenderingEngine(renderingEngineId) + for (let i = 0; i < this.cells.length; i++) { + const viewportId = `${this.viewportKey}-${i}` + const viewport = renderingEngine.getViewport(viewportId) + viewport.render() + } + console.log(e) } }, async customAnnotationCompletedListener(e) { @@ -1637,6 +1655,7 @@ export default { try { // if ( this.resetAnnotation && this.isFusion ) return false if (!annotation) return false + if (this.readingTaskState === 2 && !annotation.data.label) return false if (this.readingTaskState === 2) { const errorMsg = { message: 'annotation Not allowed to operate' } throw errorMsg @@ -1665,10 +1684,10 @@ export default { ) if (annotation.markId) { let res = await deleteCustomTag(annotation.markId) - if (!res.IsSuccess) return false + if (!res.IsSuccess) throw '' }else if (annotation.id) { let res = await deleteCustomTag(annotation.id) - if (!res.IsSuccess) return false + if (!res.IsSuccess) throw '' } } const index = this.markedSeriesIds.indexOf(annotation.seriesId) @@ -2093,7 +2112,7 @@ export default { } }, setMoreToolActive(toolName) { - if (this.readingTaskState === 2) return + // if (this.readingTaskState === 2) return this.setToolsPassive() const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) { diff --git a/src/views/trials/trials-panel/reading/visit-review/components/FileViewer.vue b/src/views/trials/trials-panel/reading/visit-review/components/FileViewer.vue index 4415e20f..1294a4c3 100644 --- a/src/views/trials/trials-panel/reading/visit-review/components/FileViewer.vue +++ b/src/views/trials/trials-panel/reading/visit-review/components/FileViewer.vue @@ -45,9 +45,8 @@ >
--> - -
+
@@ -69,10 +68,9 @@
- -
+ +