Compare commits

..

No commits in common. "7581b430d61624bdb4ac081ea855b4174012c279" and "f94fad9c7ae9aa1e74f73bf83330ac695d891c0e" have entirely different histories.

1 changed files with 14 additions and 21 deletions

View File

@ -251,6 +251,7 @@ export default {
res.map((item) => {
this.loadInitialImage(item)
})
console.log(res)
var i = res.findIndex(s => s.isCurrentTask)
if (i > -1) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
@ -267,11 +268,11 @@ export default {
// study.SeriesList.map((series, seriesIndex) => {
// if (series.modality !== 'SR') {
// series.imageIds.map(image => {
// var p = priority - seriesIndex
// var p = null
// if (series.seriesId === res[i].seriesId) {
// p = priority
// } else {
// --p
// p = priority - seriesIndex
// }
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority: p })
// })
@ -338,9 +339,7 @@ export default {
var p = parseInt(new Date().getTime())
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
if (seriesInfo.isCurrentTask) {
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
}
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId })
})
},
getStudyList() {
@ -718,7 +717,7 @@ export default {
// requestPoolManager.startTaskTimer()
this.imageList.map(image => {
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
this.imageLoaded(image, res.data.string('x0020000e'))
this.imageLoaded(image)
})
})
requestPoolManager.sortTaskPool()
@ -759,24 +758,18 @@ export default {
requestPoolManager.removeTask(series.seriesId)
this.$set(this.studyList[studyIndex].SeriesList[seriesIndex], 'isLoading', false)
},
async imageLoaded(image, seriesUid) {
async imageLoaded(image) {
// await store.dispatch('reading/updateStudyList', { visitTaskId: image.visitTaskId, imageId: image.imageId, seriesUid })
// console.log(this.studyList[image.studyIndex].SeriesList[image.seriesIndex])
if (image.studyIndex > -1 && image.seriesIndex > -1) {
var prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount
var instanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
if (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId)
prefetchInstanceCount = prefetchInstanceCount + 1
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = prefetchInstanceCount
}
if (prefetchInstanceCount >= instanceCount) {
var count = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = count + 1
} else {
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
//
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].loadStatus = true
}
}
// store.dispatch('reading/updateSeriesList', { visitTaskindex: this.visitTaskIdx, studyIndex: image.studyIndex, seriesIndex: image.seriesIndex, imageId: image.imageId })
},
// instance