diff --git a/src/views/dicom-show/dicom-study.vue b/src/views/dicom-show/dicom-study.vue index 60d212aa..28ed6ee7 100644 --- a/src/views/dicom-show/dicom-study.vue +++ b/src/views/dicom-show/dicom-study.vue @@ -68,13 +68,11 @@
{{ instance.InstanceNumber }}
{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}
- -
{{ item.modality }}: {{ item.instanceCount }} image @@ -250,8 +248,11 @@ export default { for (let j = 0; j < i.NumberOfFrames; j++) { imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`) } + i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&seriesIndex=${index}` } else { - imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`) + const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}` + imageIds.push(imageId) + i.ImageId = imageId } }) var subjectVisitId = this.$router.currentRoute.query.subjectVisitId @@ -315,15 +316,19 @@ export default { let isExistMutiFrames = false const instanceInfoList = [] res.Result.forEach(instance => { + let imageId = '' if (instance.NumberOfFrames > 1) { for (let i = 0; i < instance.NumberOfFrames; i++) { imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`) } isExistMutiFrames = true + imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=0&instanceId=${instance.Id}&seriesIndex=0` } else { - imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`) + const path = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0` + imageIds.push(path) + imageId = path } - instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path }) + instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId }) }) seriesList.push({ trialId, @@ -378,13 +383,22 @@ export default { } if (!isAddToTakPool) { var priority = parseInt(new Date().getTime()) + // var images = [] + // if (series.isExistMutiFrames) { + // images = series.imageIds.filter(i => i.includes('?frame=0')) + // } else { + // images = series.imageIds + // } + // images.map(imageId => { + // this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + // }) if (series.isExistMutiFrames) { series.instanceInfoList.map(image => { - this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) }) } else { series.imageIds.map(imageId => { - this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) }) } if (this.imageList.length > 0) { @@ -431,13 +445,22 @@ export default { } if (!isAddToTakPool) { var priority = parseInt(new Date().getTime()) + // if (series.isExistMutiFrames) { + // series.instanceInfoList.map(image => { + // this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + // }) + // } else { + // series.imageIds.map((imageId) => { + // this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + // }) + // } if (series.isExistMutiFrames) { series.instanceInfoList.map(image => { - this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) }) } else { - series.imageIds.map((imageId) => { - this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + series.imageIds.map(imageId => { + this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) }) } @@ -578,29 +601,22 @@ export default { if (seriesIndex === -1) return const series = this.seriesList[seriesIndex] var priority = new Date().getTime() - // for (let i = 0; i < series.imageIds.length; i++) { - // const imageId = series.imageIds[i] - // if (series.isExistMutiFrames) { - // const params = this.getInstanceInfo(imageId) - // if (params.frame && params.frame > 0) { - // continue - // } - // } - // var p = null - // if (this.firstInstanceId === imageId) { - // p = priority * 100 - // } else { - // p = priority - 1 - // } - // this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p }) + // var images = [] + // if (series.isExistMutiFrames) { + // images = series.imageIds.filter(i => i.includes('?frame=0')) + // } else { + // images = series.imageIds // } + // images.map(imageId => { + // this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + // }) if (series.isExistMutiFrames) { series.instanceInfoList.map(image => { - this.imageList.push({ imageId: image.Path, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) }) } else { series.imageIds.map(imageId => { - this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) + this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) }) } if (this.imageList.length > 0) { diff --git a/src/views/dicom-show/dicom-visit.vue b/src/views/dicom-show/dicom-visit.vue index 51c0a7c1..7b96b9a6 100644 --- a/src/views/dicom-show/dicom-visit.vue +++ b/src/views/dicom-show/dicom-visit.vue @@ -171,7 +171,7 @@ class="viewernavigatorwrapper" style="position: relative;border:1px solid #434343;" series-type="relation" - @click="showRelationSeriesImage($event,seriesItem,index)" + @click="showRelationSeriesImage($event,seriesItem,studyIndex,index)" >