|
|
@ -184,8 +184,7 @@ export default {
|
|
|
|
isSrFullscreen: false,
|
|
|
|
isSrFullscreen: false,
|
|
|
|
srDialogVisible: false,
|
|
|
|
srDialogVisible: false,
|
|
|
|
srInfo: {},
|
|
|
|
srInfo: {},
|
|
|
|
digitPlaces: 2,
|
|
|
|
digitPlaces: 2
|
|
|
|
visitTaskIdx: -1
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -200,14 +199,6 @@ export default {
|
|
|
|
if (idx === -1) return
|
|
|
|
if (idx === -1) return
|
|
|
|
this.measureData = this.visitTaskList[idx].MeasureData
|
|
|
|
this.measureData = this.visitTaskList[idx].MeasureData
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
visitTaskId: {
|
|
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
|
|
handler(val) {
|
|
|
|
|
|
|
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
|
|
|
|
|
|
|
if (idx === -1) return
|
|
|
|
|
|
|
|
this.visitTaskIdx = idx
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// activeSeries: {
|
|
|
|
// activeSeries: {
|
|
|
|
// immediate: true,
|
|
|
|
// immediate: true,
|
|
|
@ -268,13 +259,13 @@ 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
|
|
|
|
// let priority = 0
|
|
|
|
// if (series.seriesId === res[i].seriesId) {
|
|
|
|
// if (series.seriesId === res[i].seriesId) {
|
|
|
|
// p = priority
|
|
|
|
// priority = parseInt(new Date().getTime()) * 10
|
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
// p = priority - seriesIndex
|
|
|
|
// priority = --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 })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// })
|
|
|
@ -339,7 +330,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 => {
|
|
|
|
this.imageLoaded({ studyIndex: seriesInfo.studyIndex, seriesIndex: seriesInfo.seriesIndex, imageId: res.imageId })
|
|
|
|
this.imageLoaded(seriesInfo, res.data.string('x0020000e'))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getStudyList() {
|
|
|
|
getStudyList() {
|
|
|
@ -691,11 +682,13 @@ export default {
|
|
|
|
// if (isCurrentTask || isBaseLineTask) {
|
|
|
|
// if (isCurrentTask || isBaseLineTask) {
|
|
|
|
// // 当前任务/基线任务下载所有影像
|
|
|
|
// // 当前任务/基线任务下载所有影像
|
|
|
|
// series.imageIds.map(image => {
|
|
|
|
// series.imageIds.map(image => {
|
|
|
|
|
|
|
|
// priority = priority - 1
|
|
|
|
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
|
|
|
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// } else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) {
|
|
|
|
// } else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) {
|
|
|
|
// // 非当前随访任务下载关键影像
|
|
|
|
// // 非当前随访任务下载关键影像
|
|
|
|
// series.imageIds.map(image => {
|
|
|
|
// series.imageIds.map(image => {
|
|
|
|
|
|
|
|
// priority = priority - 1
|
|
|
|
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
|
|
|
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
// }
|
|
|
@ -717,7 +710,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({ visitTaskId: this.visitTaskId, imageId: image.imageId }, res.data.string('x0020000e'))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
requestPoolManager.sortTaskPool()
|
|
|
|
requestPoolManager.sortTaskPool()
|
|
|
@ -758,28 +751,17 @@ 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])
|
|
|
|
|
|
|
|
if (this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
|
|
|
|
|
|
|
|
this.studyList[image.studyIndex].SeriesList[image.seriesIndex].imageloadedArr.push(image.imageId)
|
|
|
|
|
|
|
|
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下载成功回调
|
|
|
|
// instance下载成功回调
|
|
|
|
async cornerstoneImageLoaded(e) {
|
|
|
|
async cornerstoneImageLoaded(e) {
|
|
|
|
// var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
|
|
|
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
|
|
|
// if (idx === -1) return
|
|
|
|
if (idx === -1) return
|
|
|
|
// this.studyList = this.visitTaskList[idx].StudyList
|
|
|
|
this.studyList = this.visitTaskList[idx].StudyList
|
|
|
|
// if (!this.studyList || this.studyList.length === 0) {
|
|
|
|
if (!this.studyList || this.studyList.length === 0) {
|
|
|
|
// return
|
|
|
|
return
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// if (!this.visitTaskList[idx].IsInit) {
|
|
|
|
// if (!this.visitTaskList[idx].IsInit) {
|
|
|
|
// const loading = this.$loading({ fullscreen: true })
|
|
|
|
// const loading = this.$loading({ fullscreen: true })
|
|
|
|
// await store.dispatch('reading/getMeasuredData', this.visitTaskList[idx].VisitTaskId)
|
|
|
|
// await store.dispatch('reading/getMeasuredData', this.visitTaskList[idx].VisitTaskId)
|
|
|
@ -789,38 +771,38 @@ export default {
|
|
|
|
// await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[idx].VisitTaskId })
|
|
|
|
// await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[idx].VisitTaskId })
|
|
|
|
// loading.close()
|
|
|
|
// loading.close()
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// await store.dispatch('reading/updateStudyList', { visitTaskId: this.visitTaskId, imageId: e.detail.image.imageId, seriesUid: e.detail.image.data.string('x0020000e') })
|
|
|
|
await store.dispatch('reading/updateStudyList', { visitTaskId: this.visitTaskId, imageId: e.detail.image.imageId, seriesUid: e.detail.image.data.string('x0020000e') })
|
|
|
|
// const uri = e.detail.image.sharedCacheKey
|
|
|
|
const uri = e.detail.image.sharedCacheKey
|
|
|
|
// const index = this.cachedImages.findIndex(item => item.uri === uri)
|
|
|
|
const index = this.cachedImages.findIndex(item => item.uri === uri)
|
|
|
|
// if (index === -1) {
|
|
|
|
if (index === -1) {
|
|
|
|
// this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
|
|
|
|
this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
|
|
|
|
// } else {
|
|
|
|
} else {
|
|
|
|
// this.cachedImages[index].timestamp = new Date().getTime()
|
|
|
|
this.cachedImages[index].timestamp = new Date().getTime()
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// var imageId = e.detail.image.imageId
|
|
|
|
var imageId = e.detail.image.imageId
|
|
|
|
// var seriesUid = e.detail.image.data.string('x0020000e')
|
|
|
|
var seriesUid = e.detail.image.data.string('x0020000e')
|
|
|
|
// var studyIndex = -1
|
|
|
|
var studyIndex = -1
|
|
|
|
// var seriesIndex = -1
|
|
|
|
var seriesIndex = -1
|
|
|
|
// for (let i = 0; i < this.studyList.length; ++i) {
|
|
|
|
for (let i = 0; i < this.studyList.length; ++i) {
|
|
|
|
// for (let j = 0; j < this.studyList[i].SeriesList.length; ++j) {
|
|
|
|
for (let j = 0; j < this.studyList[i].SeriesList.length; ++j) {
|
|
|
|
// if (this.studyList[i].SeriesList[j].seriesUid === seriesUid) {
|
|
|
|
if (this.studyList[i].SeriesList[j].seriesUid === seriesUid) {
|
|
|
|
// studyIndex = i
|
|
|
|
studyIndex = i
|
|
|
|
// seriesIndex = j
|
|
|
|
seriesIndex = j
|
|
|
|
// break
|
|
|
|
break
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// if (studyIndex > 0) break
|
|
|
|
if (studyIndex > 0) break
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// if (seriesIndex < 0) return
|
|
|
|
if (seriesIndex < 0) return
|
|
|
|
|
|
|
|
|
|
|
|
// const imageIdIndex = this.studyList[studyIndex].SeriesList[seriesIndex].imageIds.indexOf(imageId)
|
|
|
|
const imageIdIndex = this.studyList[studyIndex].SeriesList[seriesIndex].imageIds.indexOf(imageId)
|
|
|
|
// if (imageIdIndex < 0) return
|
|
|
|
if (imageIdIndex < 0) return
|
|
|
|
// if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
|
|
|
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
|
|
|
// if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
|
|
|
|
if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
|
|
|
|
// // 设置当前序列状态为已下载完成
|
|
|
|
// 设置当前序列状态为已下载完成
|
|
|
|
// this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
|
|
|
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cornerstoneimagecachechanged(e) {
|
|
|
|
cornerstoneimagecachechanged(e) {
|
|
|
|
const cacheInfo = cornerstone.imageCache.getCacheInfo()
|
|
|
|
const cacheInfo = cornerstone.imageCache.getCacheInfo()
|
|
|
|