From a533bb680b5eefe1c3c168fadd5c83f386ed4a1c Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Tue, 30 Jul 2024 09:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=BA=8F=E5=88=97=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms/components/DicomViewer.vue | 4 +- .../reading/dicoms/components/StudyList.vue | 47 +++++++++-- .../dicoms/customize/CustomizeStudyList.vue | 78 +++++++++---------- 3 files changed, 83 insertions(+), 46 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 00f18d84..ba120a41 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/DicomViewer.vue @@ -878,7 +878,7 @@ export default { activeSeries: { immediate: true, handler(v) { - console.log('activeSeries', v) + // console.log('activeSeries', v) if (v && v.isCurrentTask && this.studyList.length === 0) { this.activeTaskInfo.taskName = v.taskBlindName this.activeTaskInfo.visitTaskId = v.visitTaskId @@ -1108,7 +1108,7 @@ export default { var container = this.$refs['container'] // window.addEventListener container.addEventListener('keydown', event => { - console.log(event) + // console.log(event) event.preventDefault() var idx = this.hotKeyList.findIndex(i => i.code === event.code && i.ctrlKey === event.ctrlKey && i.shiftKey === event.shiftKey && i.altKey === event.altKey) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue b/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue index 6b294f86..19d215e5 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue @@ -364,8 +364,27 @@ export default { this.studyIndex = sIdx this.seriesIndex = 0 this.activeNames = [`${this.studyList[sIdx].StudyId}`] - - this.loadImages(this.visitTaskList[idx]) + // 下载关键序列 + const i = this.studyList.findIndex(i => i.IsCriticalSequence) + if (i > -1 && this.studyList[i].SeriesList[0].length > 0) { + const series = this.studyList[i].SeriesList[0] + if (!series.loadStatus) { + let priority = parseInt(new Date().getTime()) + if (series.isExistMutiFrames) { + series.instanceInfoList.map(image => { + priority = priority - 1 + this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: i, seriesIndex: 0, visitTaskId: series.visitTaskId, priority }) + }) + } else { + series.imageIds.map(imageId => { + priority = priority - 1 + this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: i, seriesIndex: 0, visitTaskId: series.visitTaskId, priority }) + }) + } + } + } + this.loopLoad() + // this.loadImages(this.visitTaskList[idx]) } } this.isRender = true @@ -746,7 +765,8 @@ export default { var activeNames = `${this.studyList[obj.studyIndex].StudyId}` if (this.activeNames.includes(activeNames)) return this.activeNames.push(activeNames) - this.loadImages(this.visitTaskList[idx]) + // console.log('setSeriesActive', obj) + this.loadImages(obj) }, selectSeries(obj) { var seriseList = this.studyList.map(s => s.SeriesList).flat() @@ -774,10 +794,27 @@ export default { var activeNames = `${this.studyList[series.studyIndex].StudyId}` if (this.activeNames.includes(activeNames)) return this.activeNames.push(activeNames) - this.loadImages(this.visitTaskList[idx]) + this.loadImages(series) store.dispatch('reading/setActiveSeries', series) }, - loadImages(taskInfo) { + loadImages(series) { + var priority = parseInt(new Date().getTime()) + if (!series.loadStatus && series.isDicom && series.modality !== 'SR') { + if (series.isExistMutiFrames) { + series.instanceInfoList.map(image => { + priority = priority - 1 + this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: series.studyIndex, seriesIndex: series.seriesIndex, visitTaskId: series.visitTaskId, priority }) + }) + } else { + series.imageIds.map(imageId => { + priority = priority - 1 + this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: series.studyIndex, seriesIndex: series.seriesIndex, visitTaskId: series.visitTaskId, priority }) + }) + } + } + this.loopLoad() + }, + loadImages1(taskInfo) { // const isBaseLineTask = taskInfo.IsBaseLineTask const isCurrentTask = taskInfo.IsCurrentTask // var priority = isCurrentTask ? parseInt(new Date().getTime()) : 999 diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue index 92380038..e7cf398b 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue @@ -345,8 +345,27 @@ export default { this.studyIndex = sIdx this.seriesIndex = 0 this.activeNames = [`${this.studyList[sIdx].StudyId}`] - - this.loadImages(this.visitTaskList[idx]) + // 下载关键序列 + const i = this.studyList.findIndex(i => i.IsCriticalSequence) + if (i > -1 && this.studyList[i].SeriesList[0].length > 0) { + const series = this.studyList[i].SeriesList[0] + if (!series.loadStatus) { + let priority = parseInt(new Date().getTime()) + if (series.isExistMutiFrames) { + series.instanceInfoList.map(image => { + priority = priority - 1 + this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: i, seriesIndex: 0, visitTaskId: series.visitTaskId, priority }) + }) + } else { + series.imageIds.map(imageId => { + priority = priority - 1 + this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: i, seriesIndex: 0, visitTaskId: series.visitTaskId, priority }) + }) + } + } + } + this.loopLoad() + // this.loadImages(this.visitTaskList[idx]) } } this.isRender = true @@ -727,7 +746,8 @@ export default { var activeNames = `${this.studyList[obj.studyIndex].StudyId}` if (this.activeNames.includes(activeNames)) return this.activeNames.push(activeNames) - this.loadImages(this.visitTaskList[idx]) + // this.loadImages(this.visitTaskList[idx]) + this.loadImages(obj) }, selectSeries(obj) { var seriseList = this.studyList.map(s => s.SeriesList).flat() @@ -755,45 +775,25 @@ export default { var activeNames = `${this.studyList[series.studyIndex].StudyId}` if (this.activeNames.includes(activeNames)) return this.activeNames.push(activeNames) - this.loadImages(this.visitTaskList[idx]) + this.loadImages(series) + // this.loadImages(this.visitTaskList[idx]) store.dispatch('reading/setActiveSeries', series) }, - loadImages(taskInfo) { - // const isBaseLineTask = taskInfo.IsBaseLineTask - const isCurrentTask = taskInfo.IsCurrentTask - // var priority = isCurrentTask ? parseInt(new Date().getTime()) : 999 + loadImages(series) { var priority = parseInt(new Date().getTime()) - this.studyList.map((study, studyIndex) => { - study.SeriesList.map((series, seriesIndex) => { - if (!series.loadStatus && series.isDicom && series.modality !== 'SR') { - // if (isCurrentTask || isBaseLineTask) { - // // 当前任务/基线任务下载所有影像 - // series.imageIds.map(image => { - // this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority }) - // }) - // } else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) { - // // 非当前随访任务下载关键影像 - // series.imageIds.map(image => { - // this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority }) - // }) - // } - // 均只下载关键序列 - if (!isCurrentTask && study.IsCriticalSequence) { - if (series.isExistMutiFrames) { - series.instanceInfoList.map(image => { - priority = priority - 1 - this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority }) - }) - } else { - series.imageIds.map(imageId => { - priority = priority - 1 - this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority }) - }) - } - } - } - }) - }) + if (!series.loadStatus && series.isDicom && series.modality !== 'SR') { + if (series.isExistMutiFrames) { + series.instanceInfoList.map(image => { + priority = priority - 1 + this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: series.studyIndex, seriesIndex: series.seriesIndex, visitTaskId: series.visitTaskId, priority }) + }) + } else { + series.imageIds.map(imageId => { + priority = priority - 1 + this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: series.studyIndex, seriesIndex: series.seriesIndex, visitTaskId: series.visitTaskId, priority }) + }) + } + } this.loopLoad() },