From 4135349bfa2eab382f3596629eeb848260cacb14 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Wed, 3 Jul 2024 10:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=88=97=E8=A1=A8bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/reading.js | 6 ++++ .../reading/dicoms/components/StudyList.vue | 31 ++++++++----------- .../dicoms/customize/CustomizeStudyList.vue | 18 +++++------ 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/store/modules/reading.js b/src/store/modules/reading.js index 249444c6..8418f231 100644 --- a/src/store/modules/reading.js +++ b/src/store/modules/reading.js @@ -896,6 +896,12 @@ const actions = { resolve() }) }, + setImageloadedInfo({ state }, obj) { + var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId) + let prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount + state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount = prefetchInstanceCount + 100 + state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.push(obj.imageId) + }, setStatus({ state }, obj) { var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId) state.visitTaskList[index].IsInit = true 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 c3b6e358..0a7c181c 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue @@ -51,7 +51,7 @@
#{{ series.seriesNumber }}
-
+
@@ -300,11 +300,14 @@ export default { // 初始化待渲染序列 this.getInitSeries().then((res) => { requestPoolManager.startTaskTimer() - res.map((item) => { + res.map(async(item) => { // this.loadInitialImage(item) const imageId = item.imageIds[item.imageIdIndex] const p = parseInt(new Date().getTime()) - requestPoolManager.loadAndCacheImagePlus(imageId, item.seriesId, p * 100) + await requestPoolManager.loadAndCacheImagePlus(imageId, item.seriesId, p * 100) + if (!item.isCurrentTask) { + store.dispatch('reading/setImageloadedInfo', item) + } }) var i = res.findIndex(s => s.isCurrentTask) if (i > -1) { @@ -916,21 +919,13 @@ export default { const seriesId = this.studyList[studyIndex].SeriesList[seriesIndex].seriesId const i = this.keySeriesLoad.findIndex(i => i.seriesId === seriesId) if (this.studyList[studyIndex].IsCriticalSequence && percentComplete >= 100) { - // 关键序列处理 - if (i === -1) { - this.keySeriesLoad.push({ seriesId: seriesId, loadCount: 1, imageIds: [imageId] }) - } else { - ++this.keySeriesLoad[i].loadCount - this.keySeriesLoad[i].imageIds.push(imageId) - } - } else if (this.studyList[studyIndex].SeriesList[seriesIndex].IsBeMark && percentComplete >= 100) { - // 带有标注的序列处理 - if (i === -1) { - this.keySeriesLoad.push({ seriesId: seriesId, loadCount: 1, imageIds: [imageId] }) - } else { - ++this.keySeriesLoad[i].loadCount - this.keySeriesLoad[i].imageIds.push(imageId) - } + // 关键序列处理 + if (i === -1) { + this.keySeriesLoad.push({ seriesId: seriesId, loadCount: 1, imageIds: [imageId] }) + } else { + ++this.keySeriesLoad[i].loadCount + this.keySeriesLoad[i].imageIds.push(imageId) + } } if (!this.studyList[studyIndex].IsCriticalSequence && i > -1) { this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount + 100 * this.keySeriesLoad[i].loadCount 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 abda6354..1b5a35c2 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue @@ -51,7 +51,7 @@
#{{ series.seriesNumber }}
-
+
@@ -282,10 +282,14 @@ export default { // 初始化待渲染序列 this.getInitSeries().then((res) => { requestPoolManager.startTaskTimer() - res.map((item) => { + res.map(async(item) => { let imageId = item.imageIds[item.imageIdIndex] const p = parseInt(new Date().getTime()) - requestPoolManager.loadAndCacheImagePlus(imageId, item.seriesId, p * 100) + // requestPoolManager.loadAndCacheImagePlus(imageId, item.seriesId, p * 100) + await requestPoolManager.loadAndCacheImagePlus(imageId, item.seriesId, p * 100) + if (!item.isCurrentTask) { + store.dispatch('reading/setImageloadedInfo', item) + } }) var i = res.findIndex(s => s.isCurrentTask) if (i > -1) { @@ -896,14 +900,6 @@ export default { ++this.keySeriesLoad[i].loadCount this.keySeriesLoad[i].imageIds.push(imageId) } - } else if (this.studyList[studyIndex].SeriesList[seriesIndex].IsBeMark && percentComplete >= 100) { - // 带有标注的序列处理 - if (i === -1) { - this.keySeriesLoad.push({ seriesId: seriesId, loadCount: 1, imageIds: [imageId] }) - } else { - ++this.keySeriesLoad[i].loadCount - this.keySeriesLoad[i].imageIds.push(imageId) - } } if (!this.studyList[studyIndex].IsCriticalSequence && i > -1) { this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount + 100 * this.keySeriesLoad[i].loadCount