diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue index 21ff6235..47cadf5f 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue @@ -629,8 +629,15 @@ export default { const routeData = this.$router.resolve({ path }) this.screenshotWindow = window.open(routeData.href, '_blank') }) + window.addEventListener("beforeunload",() => { + if (this.screenshotWindow) { + this.screenshotWindow.close() + } + }) + }, beforeDestroy() { + console.log('beforeDestroy',this.screenshotWindow) if (this.screenshotWindow) { this.screenshotWindow.close() } @@ -645,6 +652,7 @@ export default { FusionEvent.$off('removeAnnotation') FusionEvent.$off('imageLocation') FusionEvent.$off('getScreenshots') + window.removeEventListener("beforeunload") }, methods: {