From 7b475b487347cd6ea523600e11eaf7ef0e68bf1d Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 29 Mar 2024 12:56:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=9E=8D=E5=90=88=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=85=B3=E9=97=AD=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms/components/Fusion/PetCt.vue | 8 ++++++++ 1 file changed, 8 insertions(+) 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: {