From e5233c889438164aaeb0f28cf2db0c82a68b4037 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 15 Dec 2025 17:13:34 +0800 Subject: [PATCH] =?UTF-8?q?PET-CT=E8=9E=8D=E5=90=88=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E6=B5=8B=E9=87=8F=E5=80=BC=E5=92=8C=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms3D/components/ReadPage.vue | 39 ++++++++++++++++++- .../components/customize/QuestionList.vue | 32 +++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) 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 8bbc24bd..6f99003e 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -2561,8 +2561,14 @@ export default { }, async activeSeries(obj) { if (this.isFusion || this.isMPR) { - const confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack')) - if (!confirm) return false + if (this.isFusion && this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].verifyAnnotationIsSave()) { + const confirm = await this.$confirm(this.$t('trials:reading:confirm:clearnAnnotation')) + if (!confirm) return false + this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].removeAllNoSaveAnnotation() + } else { + const confirm = await this.$confirm(this.$t('trials:reading:confirm:changeStack')) + if (!confirm) return false + } this.isFusion = false this.setToolsPassive() this.rows = 1 @@ -2758,6 +2764,18 @@ export default { this.activeViewportIndex = 0 // return this.activeSeries(series) } + if (this.isFusion) { + this.activeViewportIndex = 0 + if (series.Modality === 'PT') { + this.activeViewportIndex = 1 + } + series = { + data: series, + StudyIndex: series.StudyIndex, + SeriesIndex: series.SeriesIndex, + TaskInfo: series.TaskInfo + } + } } this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, true) this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex) @@ -2803,6 +2821,18 @@ export default { this.activeViewportIndex = 0 // return this.activeSeries(series) } + if (this.isFusion) { + this.activeViewportIndex = 0 + if (series.Modality === 'PT') { + this.activeViewportIndex = 1 + } + series = { + data: series, + StudyIndex: series.StudyIndex, + SeriesIndex: series.SeriesIndex, + TaskInfo: series.TaskInfo + } + } } this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, true) this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex) @@ -3212,6 +3242,11 @@ export default { }, async handleFusion(data) { try { + if (!this.isFusion && this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].verifyAnnotationIsSave()) { + const confirm = await this.$confirm(this.$t('trials:reading:confirm:clearnAnnotation')) + if (!confirm) return false + this.$refs[`ecrf_${this.taskInfo.VisitTaskId}`][0].removeAllNoSaveAnnotation() + } this.fusionVisible = false this.isFusion = true this.rows = 2 diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue index 775f3ae9..11323f3f 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue @@ -703,6 +703,38 @@ export default { loading.close() } }, + verifyAnnotationIsSave() { + return Object.keys(this.questionsMarkStatus).some(key => !this.questionsMarkStatus[key].isSaved) + }, + removeAllNoSaveAnnotation() { + Object.keys(this.questionsMarkStatus).forEach(key => { + if (!this.questionsMarkStatus[key].isSaved) { + if (key.includes("_")) { + let QuestionId = key.split("_")[1] + DicomEvent.$emit('operateImageMarkerTable', { QuestionId, operateStateEnum: 4 }) + } else { + let QuestionId = key + let res = this.findQuestion(QuestionId, this.questions) + if (res) { + DicomEvent.$emit('operateImageMarker', { QuestionId, operateStateEnum: 4 }) + } else { + DicomEvent.$emit('operateImageMarkerTable', { QuestionId, operateStateEnum: 4 }) + } + } + } + }) + }, + findQuestion(id, arr) { + for (let i = 0; i < arr.length; i++) { + let item = arr[i] + if (item.Id === id) return true + if (item.Childrens) { + let res = this.findQuestion(id, item.Childrens) + if (res) return true + } + if (i === arr.length - 1) return false + } + }, findMarkIndex(question) { const { Id, RowId } = question if (this.isTableQuestion) {