切换序列时排序
parent
dc66bdb40c
commit
04aefe8347
|
@ -14,7 +14,7 @@ async function executeTask() {
|
||||||
// stopTaskTimer()
|
// stopTaskTimer()
|
||||||
if (taskPool.length > 0) {
|
if (taskPool.length > 0) {
|
||||||
let startSortTime = performance.now()
|
let startSortTime = performance.now()
|
||||||
sortTaskPool()
|
// sortTaskPool()
|
||||||
let endSortTime = performance.now()
|
let endSortTime = performance.now()
|
||||||
var requestNum = Math.min(taskPool.length, maxRequest)
|
var requestNum = Math.min(taskPool.length, maxRequest)
|
||||||
const tasks = taskPool.splice(0, requestNum);
|
const tasks = taskPool.splice(0, requestNum);
|
||||||
|
@ -140,6 +140,7 @@ function buildImageRequestTask(imageId,seriesId, config = {}) {
|
||||||
export default {
|
export default {
|
||||||
addTaskIntoPool,
|
addTaskIntoPool,
|
||||||
executeTask,
|
executeTask,
|
||||||
|
sortTaskPool,
|
||||||
startTaskTimer,
|
startTaskTimer,
|
||||||
stopTaskTimer,
|
stopTaskTimer,
|
||||||
loadAndCacheImagePlus,
|
loadAndCacheImagePlus,
|
||||||
|
|
|
@ -646,12 +646,15 @@ export default {
|
||||||
|
|
||||||
loopLoad() {
|
loopLoad() {
|
||||||
if (this.imageList.length > 0) {
|
if (this.imageList.length > 0) {
|
||||||
|
|
||||||
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({ visitTaskId: this.visitTaskId, imageId: image.imageId }, res.data.string('x0020000e'))
|
this.imageLoaded({ visitTaskId: this.visitTaskId, imageId: image.imageId }, res.data.string('x0020000e'))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
requestPoolManager.sortTaskPool()
|
||||||
|
|
||||||
this.imageList = []
|
this.imageList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue