Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing Details

uat_us
熊飞 2024-01-29 14:18:41 +08:00
commit 93831ceb88
1 changed files with 21 additions and 14 deletions

View File

@ -251,7 +251,6 @@ 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)
@ -268,11 +267,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 = null // var p = priority - seriesIndex
// if (series.seriesId === res[i].seriesId) { // if (series.seriesId === res[i].seriesId) {
// p = priority // p = priority
// } else { // } else {
// p = priority - seriesIndex // --p
// } // }
// 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 })
// }) // })
@ -339,7 +338,9 @@ 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 => {
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }) if (seriesInfo.isCurrentTask) {
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId }, res.data.string('x0020000e'))
}
}) })
}, },
getStudyList() { getStudyList() {
@ -717,7 +718,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) this.imageLoaded(image, res.data.string('x0020000e'))
}) })
}) })
requestPoolManager.sortTaskPool() requestPoolManager.sortTaskPool()
@ -758,18 +759,24 @@ 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) { async imageLoaded(image, seriesUid) {
// 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 (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) { if (image.studyIndex > -1 && image.seriesIndex > -1) {
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId) var prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount
var count = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount var instanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = count + 1 if (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
} else { this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId)
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].prefetchInstanceCount = this.studyList[image.studyIndex].SeriesList[image.seriesIndex].instanceCount prefetchInstanceCount = prefetchInstanceCount + 1
// 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