From 0e5d1fb71872e789b773f4f28f133b7959033439 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 28 Mar 2024 10:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=97=85=E7=81=B6=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=90=8C=E6=97=B6=E5=8F=AA=E6=89=93=E5=BC=80=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Fusion/HistoryScreenshot.vue | 5 +++++ .../reading/dicoms/components/Fusion/PetCt.vue | 15 ++++++++++++++- .../dicoms/components/Fusion/Questions.vue | 3 +-- .../components/Fusion/TableQuestionItem.vue | 3 +-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue index d32363ee..c1ea5f88 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/HistoryScreenshot.vue @@ -151,6 +151,11 @@ export default { }) }) }, + receiveMsg(event) { + if (event.data.type === 'setReadingState' || event.data.type === 'closeHistoryScreenshot') { + window.close() + } + }, toRight() { if (this.translateX < this.pageSize * this.itemWidth) { this.translateX = 0 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 eda2ef90..9fc36654 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 @@ -527,7 +527,8 @@ export default { initAnnotations: [], activeCanvasWW: null, activeCanvasWC: null, - fusion: { visible: false } // 历史记录融合调窗 + fusion: { visible: false }, // 历史记录融合调窗 + screenshotWindow: null // initFirstAnnotation:false } }, @@ -621,6 +622,13 @@ export default { loading.close() callback(pictureBaseStr) }) + FusionEvent.$on('viewHistoryScreenshot', (path) => { + if (this.screenshotWindow) { + this.screenshotWindow.close() + } + const routeData = this.$router.resolve({ path }) + this.screenshotWindow = window.open(routeData.href, '_blank') + }) }, destroyed() { cornerstoneTools.destroy() @@ -2127,11 +2135,16 @@ export default { } else if (event.data.type === 'readingPageStateUpdate') { this.readingTaskState = event.data.data.readingTaskState if (this.readingTaskState === 2) { + FusionEvent.$emit('closeHistoryScreenshot') + if (this.screenshotWindow) { + this.screenshotWindow.close() + } window.close() } } else if (event.data.type === 'setReadingState') { this.readingTaskState = event.data.data.readingTaskState if (this.readingTaskState === 2) { + FusionEvent.$emit('closeHistoryScreenshot') window.close() } } diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue index fd991db0..a1d38c19 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue @@ -417,8 +417,7 @@ export default { var token = getToken() var subjectCode = this.$route.query.subjectCode var path = `/historyScreenshot?&subjectCode=${subjectCode}&visitTaskId=${this.visitTaskId}&questionType=${question.QuestionType}&TokenKey=${token}` - const routeData = this.$router.resolve({ path }) - window.open(routeData.href, '_blank') + FusionEvent.$emit('viewHistoryScreenshot', path) }, setMeasuredData(measurement) { if (measurement.data.isHandleOutsideImage) { diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue index cf5a5eef..2a42a448 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue @@ -1022,8 +1022,7 @@ export default { var token = getToken() var subjectCode = this.$route.query.subjectCode var path = `/historyScreenshot?rowId=${rowId}&subjectCode=${subjectCode}&lesionName=${this.lesionName}&TokenKey=${token}` - const routeData = this.$router.resolve({ path }) - window.open(routeData.href, '_blank') + FusionEvent.$emit('viewHistoryScreenshot', path) } } }