From 8203b3d738ef5e2cfc20fb5b765247d6d557ade5 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 18 Jun 2026 09:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=BA=8F=E5=88=97=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms/components/DicomViewer.vue | 21 +++++----- .../reading/dicoms3D/components/ReadPage.vue | 20 ++++++---- .../visit-review/components/FileViewer.vue | 40 +++++++++++++++++-- 3 files changed, 58 insertions(+), 23 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue index bb042b64..c5ac4c6b 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue @@ -1404,10 +1404,9 @@ export default { }, async showKeySeriesPanel() { this.keySeries = [] + const visitTaskId = this.getKeySeriesVisitTaskId() + if (!visitTaskId) return this.keySeriesLoading = true - const idx = this.visitTaskList.findIndex(i => i.IsCurrentTask) - if (idx === -1) return - const visitTaskId = this.visitTaskList[idx].VisitTaskId try { const res = await getMarkList({ visitTaskId }) if (res && res.Result) { @@ -1421,16 +1420,14 @@ export default { }, jumpToKeySeries(kf) { this.keySeriesPopoverVisible = false - const idx = this.visitTaskList.findIndex(i => i.IsCurrentTask) - if (idx === -1) return - const visitTaskId = this.visitTaskList[idx].VisitTaskId + const visitTaskId = this.getKeySeriesVisitTaskId() if (!visitTaskId) return - let annotation = {} - try { - annotation = kf.MeasureData ? JSON.parse(kf.MeasureData) : {} - } catch (err) { - console.error(err) - } + // let annotation = {} + // try { + // annotation = kf.MeasureData ? JSON.parse(kf.MeasureData) : {} + // } catch (err) { + // console.error(err) + // } const series = this.getSeriesInfoByMark(visitTaskId, {lesionName: kf.MarkName}) if (!series) return this.loadImageStack(series) 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 f3008f28..c48e33cf 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -4298,11 +4298,14 @@ export default { async showKeySeriesPanel() { this.keySeries = [] this.keySeriesLoading = true - try { - let res = await getMarkList({ visitTaskId: this.taskInfo.VisitTaskId }) - if (res && res.Result) { - this.keySeries = res.Result + const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series + const visitTaskId = series?.TaskInfo?.VisitTaskId + if (visitTaskId) { + let res = await getMarkList({ visitTaskId: visitTaskId }) + if (res && res.Result) { + this.keySeries = res.Result + } } } catch (err) { console.error(err) @@ -4311,16 +4314,19 @@ export default { } }, jumpToKeySeries(kf) { - let tIdx = this.visitTaskList.findIndex(i=> i.VisitTaskId === this.taskInfo.VisitTaskId) + const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series + const visitTaskId = series?.TaskInfo?.VisitTaskId + if (!visitTaskId) return + let tIdx = this.visitTaskList.findIndex(i=> i.VisitTaskId === visitTaskId) if (tIdx < 0) return const task = this.visitTaskList[tIdx] const studyList = task.StudyList const annotation = kf.MeasureData ? JSON.parse(kf.MeasureData) : {} let targetSeries = this.getMarkedSeries(studyList, annotation, true) if (Object.keys(targetSeries).length === 0) return - this.activeTaskId = this.taskInfo.VisitTaskId + // this.activeTaskId = this.taskInfo.VisitTaskId this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(targetSeries, true) - this.$refs[this.taskInfo.VisitTaskId][0].setSeriesActive(targetSeries.StudyIndex, targetSeries.SeriesIndex) + this.$refs[visitTaskId][0].setSeriesActive(targetSeries.StudyIndex, targetSeries.SeriesIndex) }, showPanel(e, toolName) { if (toolName === 'layout' && (this.isFusion || this.isMPR)) return false 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 d1abb74e..f83cc090 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 @@ -424,6 +424,30 @@ const { BidirectionalTool, // cursors } = cornerstoneTools +const newStyles = { + global: { + color: 'rgb(255, 0, 0)', + colorHighlighted: 'rgb(0, 255, 0)', + colorSelected: 'rgb(255, 0, 0)', + colorLocked: 'rgb(255, 0, 0)', + lineWidth: '1', + lineDash: '', + shadow: true, + textBoxVisibility: true, + textBoxFontFamily: 'Helvetica Neue, Helvetica, Arial, sans-serif', + textBoxFontSize: '14px', + textBoxColor: 'rgb(255, 0, 0)', + textBoxColorHighlighted: 'rgb(0, 255, 0)', + textBoxColorSelected: 'rgb(255, 0, 0)', + textBoxColorLocked: 'rgb(255, 0, 0)', + textBoxBackground: '', + textBoxLinkLineWidth: '1', + textBoxLinkLineDash: '2,3', + textBoxShadow: true, + markerSize: '10' + } +} +cornerstoneTools.annotation.config.style.setDefaultToolStyles(newStyles) const { MouseBindings, Events: toolsEvents } = csToolsEnums export default { name: 'ImageViewer', @@ -667,10 +691,15 @@ export default { this.keySeriesLoading = true try { - const res = await getNoneDicomMarkList({ visitTaskId: this.taskInfo.VisitTaskId }) - if (res && res.Result) { - this.keySeries = res.Result + const i = this.viewportInfos.findIndex(i => i.index === this.activeCanvasIndex) + if (i > -1) { + const visitTaskId = this.viewportInfos[i].taskInfo.VisitTaskId + const res = await getNoneDicomMarkList({ visitTaskId: visitTaskId }) + if (res && res.Result) { + this.keySeries = res.Result + } } + } catch (err) { console.log(err) } finally { @@ -678,10 +707,13 @@ export default { } }, jumpToKeySeries(kf) { + const i = this.viewportInfos.findIndex(i => i.index === this.activeCanvasIndex) + if (i === -1) return + const visitTaskId = this.viewportInfos[i].taskInfo.VisitTaskId this.$emit('selectFile', { path: kf.Path, studyId: kf.StudyId, - visitTaskId: this.taskInfo.VisitTaskId + visitTaskId: visitTaskId }) }, // 初始化加载器