Compare commits
No commits in common. "7581b430d61624bdb4ac081ea855b4174012c279" and "f94fad9c7ae9aa1e74f73bf83330ac695d891c0e" have entirely different histories.
7581b430d6
...
f94fad9c7a
|
@ -251,6 +251,7 @@ export default {
|
||||||
res.map((item) => {
|
res.map((item) => {
|
||||||
this.loadInitialImage(item)
|
this.loadInitialImage(item)
|
||||||
})
|
})
|
||||||
|
console.log(res)
|
||||||
var i = res.findIndex(s => s.isCurrentTask)
|
var i = res.findIndex(s => s.isCurrentTask)
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||||
|
@ -267,11 +268,11 @@ export default {
|
||||||
// study.SeriesList.map((series, seriesIndex) => {
|
// study.SeriesList.map((series, seriesIndex) => {
|
||||||
// if (series.modality !== 'SR') {
|
// if (series.modality !== 'SR') {
|
||||||
// series.imageIds.map(image => {
|
// series.imageIds.map(image => {
|
||||||
// var p = priority - seriesIndex
|
// var p = null
|
||||||
// if (series.seriesId === res[i].seriesId) {
|
// if (series.seriesId === res[i].seriesId) {
|
||||||
// p = priority
|
// p = priority
|
||||||
// } else {
|
// } else {
|
||||||
// --p
|
// p = priority - seriesIndex
|
||||||
// }
|
// }
|
||||||
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority: p })
|
// 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 p = parseInt(new Date().getTime())
|
||||||
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
|
var imageId = seriesInfo.imageIds[seriesInfo.imageIdIndex]
|
||||||
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
|
requestPoolManager.loadAndCacheImagePlus(imageId, seriesInfo.seriesId, p * 100).then(res => {
|
||||||
if (seriesInfo.isCurrentTask) {
|
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId })
|
||||||
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStudyList() {
|
getStudyList() {
|
||||||
|
@ -718,7 +717,7 @@ export default {
|
||||||
// requestPoolManager.startTaskTimer()
|
// requestPoolManager.startTaskTimer()
|
||||||
this.imageList.map(image => {
|
this.imageList.map(image => {
|
||||||
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
|
requestPoolManager.loadAndCacheImagePlus(image.imageId, image.seriesId, image.priority).then(res => {
|
||||||
this.imageLoaded(image, res.data.string('x0020000e'))
|
this.imageLoaded(image)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
requestPoolManager.sortTaskPool()
|
requestPoolManager.sortTaskPool()
|
||||||
|
@ -759,24 +758,18 @@ export default {
|
||||||
requestPoolManager.removeTask(series.seriesId)
|
requestPoolManager.removeTask(series.seriesId)
|
||||||
this.$set(this.studyList[studyIndex].SeriesList[seriesIndex], 'isLoading', false)
|
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 })
|
// await store.dispatch('reading/updateStudyList', { visitTaskId: image.visitTaskId, imageId: image.imageId, seriesUid })
|
||||||
// console.log(this.studyList[image.studyIndex].SeriesList[image.seriesIndex])
|
// console.log(this.studyList[image.studyIndex].SeriesList[image.seriesIndex])
|
||||||
if (image.studyIndex > -1 && image.seriesIndex > -1) {
|
if (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
|
||||||
var prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount
|
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId)
|
||||||
var instanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
|
var count = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount
|
||||||
if (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
|
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = count + 1
|
||||||
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId)
|
} else {
|
||||||
prefetchInstanceCount = prefetchInstanceCount + 1
|
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
|
||||||
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = prefetchInstanceCount
|
// 设置当前序列状态为已下载完成
|
||||||
}
|
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].loadStatus = true
|
||||||
if (prefetchInstanceCount >= instanceCount) {
|
|
||||||
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 })
|
// store.dispatch('reading/updateSeriesList', { visitTaskindex: this.visitTaskIdx, studyIndex: image.studyIndex, seriesIndex: image.seriesIndex, imageId: image.imageId })
|
||||||
},
|
},
|
||||||
// instance下载成功回调
|
// instance下载成功回调
|
||||||
|
|
Loading…
Reference in New Issue