Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
aab9481030
|
@ -4,6 +4,7 @@ let numRequest = 0 // 正在执行数量
|
||||||
const maxRequest = 6 // 可配置
|
const maxRequest = 6 // 可配置
|
||||||
let taskTimer // 轮询的定时器
|
let taskTimer // 轮询的定时器
|
||||||
var cachedTask = {} // 存放的任务数据
|
var cachedTask = {} // 存放的任务数据
|
||||||
|
let sortType = 1
|
||||||
var i= 0
|
var i= 0
|
||||||
let startExecuteTask = null
|
let startExecuteTask = null
|
||||||
let endExecuteTask = performance.now()
|
let endExecuteTask = performance.now()
|
||||||
|
@ -14,7 +15,9 @@ async function executeTask() {
|
||||||
// stopTaskTimer()
|
// stopTaskTimer()
|
||||||
if (taskPool.length > 0) {
|
if (taskPool.length > 0) {
|
||||||
let startSortTime = performance.now()
|
let startSortTime = performance.now()
|
||||||
|
if( sortType ){
|
||||||
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);
|
||||||
|
@ -116,14 +119,16 @@ function removeTask(seriesId){
|
||||||
}
|
}
|
||||||
startTaskTimer()
|
startTaskTimer()
|
||||||
}
|
}
|
||||||
|
function setSortType(type){
|
||||||
|
sortType = type
|
||||||
|
}
|
||||||
function resetRequestPool(){
|
function resetRequestPool(){
|
||||||
taskPool = []
|
taskPool = []
|
||||||
pendingList =[]
|
|
||||||
cachedTask = {}
|
cachedTask = {}
|
||||||
|
sortType = 1
|
||||||
}
|
}
|
||||||
function resetCachedTask(){
|
function resetCachedTask(){
|
||||||
taskPool = []
|
taskPool = []
|
||||||
pendingList =[]
|
|
||||||
cachedTask = {}
|
cachedTask = {}
|
||||||
}
|
}
|
||||||
function buildImageRequestTask(imageId,seriesId, config = {}) {
|
function buildImageRequestTask(imageId,seriesId, config = {}) {
|
||||||
|
@ -140,6 +145,8 @@ function buildImageRequestTask(imageId,seriesId, config = {}) {
|
||||||
export default {
|
export default {
|
||||||
addTaskIntoPool,
|
addTaskIntoPool,
|
||||||
executeTask,
|
executeTask,
|
||||||
|
setSortType,
|
||||||
|
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 = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -179,6 +179,7 @@ import DicomEvent from './components/DicomEvent'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { changeURLStatic } from '@/utils/history.js'
|
import { changeURLStatic } from '@/utils/history.js'
|
||||||
|
import requestPoolManager from '@/utils/request-pool'
|
||||||
export default {
|
export default {
|
||||||
name: 'Reading',
|
name: 'Reading',
|
||||||
components: {
|
components: {
|
||||||
|
@ -228,6 +229,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
requestPoolManager.resetRequestPool()
|
||||||
|
requestPoolManager.setSortType(0)
|
||||||
DicomEvent.$on('questionFormChange', (v) => {
|
DicomEvent.$on('questionFormChange', (v) => {
|
||||||
if (this.questionFormChangeNum !== 0) {
|
if (this.questionFormChangeNum !== 0) {
|
||||||
this.questionFormChangeState = v
|
this.questionFormChangeState = v
|
||||||
|
|
Loading…
Reference in New Issue