阅片预览进度条更改
parent
847845a6c4
commit
a7a034014d
|
@ -872,192 +872,192 @@ export default {
|
|||
this.setAllToolsPassive()
|
||||
},
|
||||
onContextmenu(event) {
|
||||
const colormapsList = cornerstone.colors.getColormapsList()
|
||||
const colorItems = []
|
||||
colorItems.push({
|
||||
label: '默认值',
|
||||
onClick: () => {
|
||||
this.setColormap()
|
||||
}
|
||||
})
|
||||
colormapsList.forEach(colormap => {
|
||||
const item = {}
|
||||
item.label = colormap.name
|
||||
item.onClick = () => {
|
||||
this.setColormap(colormap.id)
|
||||
}
|
||||
colorItems.push(item)
|
||||
})
|
||||
this.$contextmenu({
|
||||
items: [
|
||||
{
|
||||
label: '移动',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.setToolActive('Pan')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '缩放',
|
||||
divided: true,
|
||||
children: [
|
||||
{
|
||||
label: '自由缩放',
|
||||
onClick: () => {
|
||||
this.setToolActive('Zoom')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '适应图像',
|
||||
onClick: () => {
|
||||
this.fitToWindow()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '适应窗口',
|
||||
onClick: () => {
|
||||
this.fitToImage()
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '透镜',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.setToolActive('Magnify')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '旋转',
|
||||
divided: true,
|
||||
children: [
|
||||
{
|
||||
label: '默认值',
|
||||
onClick: () => {
|
||||
this.resetRotate()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '自由旋转',
|
||||
onClick: () => {
|
||||
this.setToolActive('Rotate')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '水平翻转',
|
||||
onClick: () => {
|
||||
this.setRotate(true, false, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '垂直翻转',
|
||||
onClick: () => {
|
||||
this.setRotate(false, true, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '左转90度',
|
||||
onClick: () => {
|
||||
this.setRotate(false, false, -90)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '右转90度',
|
||||
onClick: () => {
|
||||
this.setRotate(false, false, 90)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// const colormapsList = cornerstone.colors.getColormapsList()
|
||||
// const colorItems = []
|
||||
// colorItems.push({
|
||||
// label: '默认值',
|
||||
// onClick: () => {
|
||||
// this.setColormap()
|
||||
// }
|
||||
// })
|
||||
// colormapsList.forEach(colormap => {
|
||||
// const item = {}
|
||||
// item.label = colormap.name
|
||||
// item.onClick = () => {
|
||||
// this.setColormap(colormap.id)
|
||||
// }
|
||||
// colorItems.push(item)
|
||||
// })
|
||||
// this.$contextmenu({
|
||||
// items: [
|
||||
// {
|
||||
// label: '移动',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Pan')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '缩放',
|
||||
// divided: true,
|
||||
// children: [
|
||||
// {
|
||||
// label: '自由缩放',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Zoom')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '适应图像',
|
||||
// onClick: () => {
|
||||
// this.fitToWindow()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '适应窗口',
|
||||
// onClick: () => {
|
||||
// this.fitToImage()
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '透镜',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Magnify')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '旋转',
|
||||
// divided: true,
|
||||
// children: [
|
||||
// {
|
||||
// label: '默认值',
|
||||
// onClick: () => {
|
||||
// this.resetRotate()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '自由旋转',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Rotate')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '水平翻转',
|
||||
// onClick: () => {
|
||||
// this.setRotate(true, false, 0)
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '垂直翻转',
|
||||
// onClick: () => {
|
||||
// this.setRotate(false, true, 0)
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '左转90度',
|
||||
// onClick: () => {
|
||||
// this.setRotate(false, false, -90)
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '右转90度',
|
||||
// onClick: () => {
|
||||
// this.setRotate(false, false, 90)
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
{
|
||||
label: '测量',
|
||||
divided: true,
|
||||
minWidth: 0,
|
||||
children: [
|
||||
{
|
||||
label: '探针',
|
||||
onClick: () => {
|
||||
this.setToolActive('Probe')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '长度测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('Length')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '角度测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('Angle')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Cobb测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('CobbAngle')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '椭圆测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('EllipticalRoi')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '矩形测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('RectangleRoi')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '多边形标记',
|
||||
onClick: () => {
|
||||
this.setToolActive('FreehandRoi')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '十字线',
|
||||
onClick: () => {
|
||||
this.setToolActive('Bidirectional')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '文字标注',
|
||||
onClick: () => {
|
||||
this.setToolActive('ArrowAnnotate')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '调窗',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.setToolActive('Wwwc')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '反色',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.toggleInvert()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '伪彩',
|
||||
children: colorItems
|
||||
}
|
||||
],
|
||||
event,
|
||||
// x: event.clientX,
|
||||
// y: event.clientY,
|
||||
customClass: 'class-a',
|
||||
zIndex: 3,
|
||||
minWidth: 100
|
||||
})
|
||||
// {
|
||||
// label: '测量',
|
||||
// divided: true,
|
||||
// minWidth: 0,
|
||||
// children: [
|
||||
// {
|
||||
// label: '探针',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Probe')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '长度测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Length')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '角度测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Angle')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: 'Cobb测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('CobbAngle')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '椭圆测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('EllipticalRoi')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '矩形测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('RectangleRoi')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '多边形标记',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('FreehandRoi')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '十字线',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Bidirectional')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '文字标注',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('ArrowAnnotate')
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '调窗',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Wwwc')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '反色',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.toggleInvert()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '伪彩',
|
||||
// children: colorItems
|
||||
// }
|
||||
// ],
|
||||
// event,
|
||||
// // x: event.clientX,
|
||||
// // y: event.clientY,
|
||||
// customClass: 'class-a',
|
||||
// zIndex: 3,
|
||||
// minWidth: 100
|
||||
// })
|
||||
return false
|
||||
},
|
||||
getToolSate() {
|
||||
|
|
|
@ -139,6 +139,22 @@ function getQuestionAnswer(questions, questionMark, answers) {
|
|||
return ''
|
||||
}
|
||||
}
|
||||
function getKeySeriesInfo(keyInstance, series) {
|
||||
const obj = {}
|
||||
const set = new Set()
|
||||
var instances = series.instanceList.concat(keyInstance).filter((item) => {
|
||||
if (set.has(item)) {
|
||||
return true
|
||||
} else {
|
||||
set.add(item)
|
||||
return false
|
||||
}
|
||||
})
|
||||
instances.map(item => {
|
||||
obj[item] = { seriesId: series.seriesId, studyIndex: series.studyIndex, seriesIndex: series.seriesIndex }
|
||||
})
|
||||
return obj
|
||||
}
|
||||
|
||||
const state = getDefaultState
|
||||
|
||||
|
@ -896,10 +912,39 @@ const actions = {
|
|||
})
|
||||
},
|
||||
setImageloadedInfo({ state }, obj) {
|
||||
console.log('setImageloadedInfo', obj)
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount
|
||||
state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount = prefetchInstanceCount + 100
|
||||
state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.push(obj.imageId)
|
||||
// const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount
|
||||
const instanceList = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].instanceList
|
||||
const idx = state.visitTaskList[index].StudyList.findIndex(i => i.IsCriticalSequence)
|
||||
|
||||
if (!state.visitTaskList[index].StudyList[obj.studyIndex].IsCriticalSequence) {
|
||||
// 当前下载的非关键序列
|
||||
console.log('当前下载的非关键序列')
|
||||
if (idx > -1) {
|
||||
const keyInstance = state.visitTaskList[index].StudyList[idx].SeriesList[0].instanceList
|
||||
obj.markedImages = getKeySeriesInfo(keyInstance, state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex])
|
||||
instanceList.map(i => {
|
||||
if (obj.markedImages.hasOwnProperty(i) && state.visitTaskList[index].StudyList[idx].SeriesList[0].imageloadedArr.indexOf(i) < 0) {
|
||||
state.visitTaskList[index].StudyList[idx].SeriesList[0].imageloadedArr.push(i)
|
||||
state.visitTaskList[index].StudyList[idx].SeriesList[0].prefetchInstanceCount = state.visitTaskList[index].StudyList[idx].SeriesList[0].prefetchInstanceCount + 100
|
||||
}
|
||||
})
|
||||
if (state.visitTaskList[index].StudyList[idx].SeriesList[0].imageloadedArr >= state.visitTaskList[index].StudyList[idx].SeriesList[0].instanceCount) {
|
||||
state.visitTaskList[index].StudyList[idx].SeriesList[0].loadStatus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].instanceCount * 100
|
||||
state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr = instanceList
|
||||
state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].loadStatus = true
|
||||
// const imageloadedArr = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr
|
||||
// if (imageloadedArr.indexOf())
|
||||
|
||||
// if (state.visitTaskList[index].StudyList[0].IsCriticalSequence){
|
||||
// state.visitTaskList[index].StudyList[0].SeriesList[0].prefetchInstanceCount = prefetchInstanceCount + 100
|
||||
// state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.push(obj.imageId)
|
||||
// }
|
||||
},
|
||||
setStatus({ state }, obj) {
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
|
|
|
@ -400,7 +400,7 @@ export default {
|
|||
idx > -1 ? obj = seriesList[idx] : ''
|
||||
}
|
||||
if (obj) {
|
||||
const index = Math.floor(obj.imageIds.length * ((baseSeries.imageIdIndex + 1) / baseSeries.instanceCount))
|
||||
const index = Math.floor(obj.imageIds.length * ((baseSeries.imageIdIndex + 1) / baseSeries.imageIds))
|
||||
obj.imageIdIndex = index > 0 ? index - 1 : 0
|
||||
}
|
||||
return obj
|
||||
|
|
|
@ -104,7 +104,6 @@
|
|||
<template slot-scope="scope">
|
||||
<span :style="{color: ((scope.row.isLymphNodes === 1 && scope.row.QuestionMark === 1) || (scope.row.isLymphNodes === 0 && scope.row.QuestionMark === 0)) && (scope.row.LesionType === 0 || scope.row.LesionType === 5) || (scope.row.QuestionMark === 12) ? '#f66' : '#fff'}" :class="scope.row.HighlightAnswerList.includes(scope.row.Answers[task.VisitTaskId]) ? 'colorOfRed' : ''">
|
||||
<!-- {{scope.row.Answers[task.VisitTaskId]}} -->
|
||||
<template v-if="scope.row.HighlightAnswerList"><span>11</span></template>
|
||||
<template v-if="task.VisitTaskId === visitTaskId && readingTaskState < 2 && [13,14,15,42].includes(scope.row.QuestionType)">
|
||||
<!-- 是否存在疾病(基线时可修改) -->
|
||||
<template v-if="task.IsBaseLine && scope.row.QuestionType=== 15">
|
||||
|
|
|
@ -220,7 +220,8 @@ export default {
|
|||
digitPlaces: 2,
|
||||
visitTaskIdx: -1,
|
||||
currentLoadIns: [],
|
||||
keySeriesLoad: []
|
||||
keySeriesLoad: [],
|
||||
markedImages: {}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -355,6 +356,9 @@ export default {
|
|||
if (idx > -1 && this.visitTaskList[idx].StudyList && this.visitTaskList[idx].StudyList.length > 0) {
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
if (Object.keys(this.markedImages).length === 0) {
|
||||
this.getKeySeriesInfo()
|
||||
}
|
||||
var sIdx = this.studyList.findIndex(s => s.IsDicom)
|
||||
if (sIdx > -1) {
|
||||
this.studyIndex = sIdx
|
||||
|
@ -374,6 +378,7 @@ export default {
|
|||
var isReadingTaskViewInOrder = parseInt(this.$router.currentRoute.query.isReadingTaskViewInOrder)
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
this.getKeySeriesInfo()
|
||||
if (this.visitTaskList[idx].IsBaseLineTask || isReadingTaskViewInOrder !== 1) {
|
||||
// 基线
|
||||
const obj = this.getFirstMarkedSeries(this.visitTaskList[idx].MeasureData, [...this.visitTaskList[idx].StudyList])
|
||||
|
@ -434,6 +439,30 @@ export default {
|
|||
|
||||
return seriesList
|
||||
},
|
||||
getKeySeriesInfo() {
|
||||
console.log('getKeySeriesInfo')
|
||||
const i = this.studyList.findIndex(i => i.IsCriticalSequence)
|
||||
if (i > -1 && this.studyList[i].SeriesList.length > 0) {
|
||||
var keyInstance = this.studyList[i].SeriesList[0].instanceList
|
||||
// const keySeriesId = this.studyList[i].SeriesList[0].seriesId
|
||||
const studyList = this.studyList.filter(i => !i.IsCriticalSequence)
|
||||
var seriesList = studyList.map(s => s.SeriesList).flat().filter(i => i.isBeMark)
|
||||
seriesList.map(i => {
|
||||
const set = new Set()
|
||||
var instances = i.instanceList.concat(keyInstance).filter((item) => {
|
||||
if (set.has(item)) {
|
||||
return true
|
||||
} else {
|
||||
set.add(item)
|
||||
return false
|
||||
}
|
||||
})
|
||||
instances.map(item => {
|
||||
this.markedImages[item] = { seriesId: i.seriesId, studyIndex: i.studyIndex, seriesIndex: i.seriesIndex }
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
getSecondMarkedSeries(baseObj, visitTaskInfo) {
|
||||
var obj = {}
|
||||
var studyList = visitTaskInfo.StudyList
|
||||
|
@ -709,6 +738,9 @@ export default {
|
|||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
if (idx === -1) return
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
if (Object.keys(this.markedImages).length === 0) {
|
||||
this.getKeySeriesInfo()
|
||||
}
|
||||
this.studyIndex = obj.studyIndex
|
||||
this.seriesIndex = obj.seriesIndex
|
||||
var activeNames = `${this.studyList[obj.studyIndex].StudyId}`
|
||||
|
@ -736,6 +768,9 @@ export default {
|
|||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === series.visitTaskId)
|
||||
if (idx === -1) return
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
if (Object.keys(this.markedImages).length === 0) {
|
||||
this.getKeySeriesInfo()
|
||||
}
|
||||
var activeNames = `${this.studyList[series.studyIndex].StudyId}`
|
||||
if (this.activeNames.includes(activeNames)) return
|
||||
this.activeNames.push(activeNames)
|
||||
|
@ -914,30 +949,27 @@ export default {
|
|||
}
|
||||
if (this.visitTaskId !== params.visitTaskId) return
|
||||
const percentComplete = e.detail.percentComplete
|
||||
|
||||
const studyIndex = parseInt(params.idx.split('|')[0])
|
||||
const seriesIndex = parseInt(params.idx.split('|')[1])
|
||||
// 关键序列处理
|
||||
const seriesId = this.studyList[studyIndex].SeriesList[seriesIndex].seriesId
|
||||
const i = this.keySeriesLoad.findIndex(i => i.seriesId === seriesId)
|
||||
if (this.studyList[studyIndex].IsCriticalSequence && percentComplete >= 100) {
|
||||
// 关键序列处理
|
||||
if (i === -1) {
|
||||
this.keySeriesLoad.push({ seriesId: seriesId, loadCount: 1, imageIds: [imageId] })
|
||||
} else {
|
||||
++this.keySeriesLoad[i].loadCount
|
||||
this.keySeriesLoad[i].imageIds.push(imageId)
|
||||
if (this.markedImages.hasOwnProperty(params.instanceId) && percentComplete >= 100) {
|
||||
const markedImage = this.markedImages[params.instanceId]
|
||||
const pStudyIndex = this.studyList[studyIndex].IsCriticalSequence ? markedImage.studyIndex : 0
|
||||
const pSeriesIndex = this.studyList[studyIndex].IsCriticalSequence ? markedImage.seriesIndex : 0
|
||||
const imageloadedArr = this.studyList[pStudyIndex].SeriesList[pSeriesIndex].imageloadedArr
|
||||
if (imageloadedArr.indexOf(params.instanceId) < 0) {
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].imageloadedArr.push(params.instanceId)
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].prefetchInstanceCount = this.studyList[pStudyIndex].SeriesList[pSeriesIndex].prefetchInstanceCount + 100
|
||||
if (this.studyList[pStudyIndex].SeriesList[pSeriesIndex].imageloadedArr.length >= this.studyList[pStudyIndex].SeriesList[pSeriesIndex].instanceCount) {
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].prefetchInstanceCount = this.studyList[pStudyIndex].SeriesList[pSeriesIndex].instanceCount * 100
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].loadStatus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!this.studyList[studyIndex].IsCriticalSequence && i > -1) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount + 100 * this.keySeriesLoad[i].loadCount
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr = [this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr, this.keySeriesLoad[i].imageIds]
|
||||
this.keySeriesLoad.splice(i, 1)
|
||||
}
|
||||
|
||||
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(params.instanceId) < 0) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.instanceId === params.instanceId)
|
||||
if (i > -1) {
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete - this.currentLoadIns[i].percentComplete
|
||||
this.currentLoadIns[i].percentComplete = percentComplete
|
||||
|
@ -946,13 +978,13 @@ export default {
|
|||
}
|
||||
} else {
|
||||
if (percentComplete !== 100) {
|
||||
this.currentLoadIns.push({ imageId, percentComplete })
|
||||
this.currentLoadIns.push({ instanceId: params.instanceId, percentComplete })
|
||||
}
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete
|
||||
}
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
|
||||
if (percentComplete >= 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(params.instanceId)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -960,7 +992,6 @@ export default {
|
|||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||
// this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
}
|
||||
},
|
||||
cornerstoneimagecachechanged(e) {
|
||||
|
|
|
@ -523,7 +523,7 @@ export default {
|
|||
if (obj) {
|
||||
let index = Math.floor(
|
||||
obj.imageIds.length *
|
||||
((baseSeries.imageIdIndex + 1) / baseSeries.instanceCount)
|
||||
((baseSeries.imageIdIndex + 1) / baseSeries.imageIds)
|
||||
);
|
||||
obj.imageIdIndex = index > 0 ? index - 1 : 0;
|
||||
}
|
||||
|
|
|
@ -219,7 +219,8 @@ export default {
|
|||
digitPlaces: 2,
|
||||
visitTaskIdx: -1,
|
||||
currentLoadIns: [],
|
||||
keySeriesLoad: []
|
||||
keySeriesLoad: [],
|
||||
markedImages: {}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -336,6 +337,9 @@ export default {
|
|||
if (idx > -1 && this.visitTaskList[idx].StudyList && this.visitTaskList[idx].StudyList.length > 0) {
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
if (Object.keys(this.markedImages).length === 0) {
|
||||
this.getKeySeriesInfo()
|
||||
}
|
||||
var sIdx = this.studyList.findIndex(s => s.IsDicom)
|
||||
if (sIdx > -1) {
|
||||
this.studyIndex = sIdx
|
||||
|
@ -354,6 +358,7 @@ export default {
|
|||
var isReadingTaskViewInOrder = JSON.parse(this.$router.currentRoute.query.isReadingTaskViewInOrder)
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
this.getKeySeriesInfo()
|
||||
if (this.visitTaskList[idx].IsBaseLineTask || isReadingTaskViewInOrder !== 1) {
|
||||
// 基线
|
||||
const obj = this.getFirstMarkedSeries(this.visitTaskList[idx].MeasureData, [...this.visitTaskList[idx].StudyList])
|
||||
|
@ -414,6 +419,29 @@ export default {
|
|||
|
||||
return seriesList
|
||||
},
|
||||
getKeySeriesInfo() {
|
||||
const i = this.studyList.findIndex(i => i.IsCriticalSequence)
|
||||
if (i > -1 && this.studyList[i].SeriesList.length > 0) {
|
||||
var keyInstance = this.studyList[i].SeriesList[0].instanceList
|
||||
// const keySeriesId = this.studyList[i].SeriesList[0].seriesId
|
||||
const studyList = this.studyList.filter(i => !i.IsCriticalSequence)
|
||||
var seriesList = studyList.map(s => s.SeriesList).flat().filter(i => i.isBeMark)
|
||||
seriesList.map(i => {
|
||||
const set = new Set()
|
||||
var instances = i.instanceList.concat(keyInstance).filter((item) => {
|
||||
if (set.has(item)) {
|
||||
return true
|
||||
} else {
|
||||
set.add(item)
|
||||
return false
|
||||
}
|
||||
})
|
||||
instances.map(item => {
|
||||
this.markedImages[item] = { seriesId: i.seriesId, studyIndex: i.studyIndex, seriesIndex: i.seriesIndex }
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
getSecondMarkedSeries(baseObj, visitTaskInfo) {
|
||||
var obj = {}
|
||||
var studyList = visitTaskInfo.StudyList
|
||||
|
@ -691,6 +719,9 @@ export default {
|
|||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
if (idx === -1) return
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
if (Object.keys(this.markedImages).length === 0) {
|
||||
this.getKeySeriesInfo()
|
||||
}
|
||||
this.studyIndex = obj.studyIndex
|
||||
this.seriesIndex = obj.seriesIndex
|
||||
var activeNames = `${this.studyList[obj.studyIndex].StudyId}`
|
||||
|
@ -718,6 +749,9 @@ export default {
|
|||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === series.visitTaskId)
|
||||
if (idx === -1) return
|
||||
this.studyList = this.visitTaskList[idx].StudyList
|
||||
if (Object.keys(this.markedImages).length === 0) {
|
||||
this.getKeySeriesInfo()
|
||||
}
|
||||
var activeNames = `${this.studyList[series.studyIndex].StudyId}`
|
||||
if (this.activeNames.includes(activeNames)) return
|
||||
this.activeNames.push(activeNames)
|
||||
|
@ -888,59 +922,57 @@ export default {
|
|||
},
|
||||
cornerstoneimageloadprogress(e) {
|
||||
const imageId = e.detail.imageId
|
||||
const percentComplete = e.detail.percentComplete
|
||||
const params = {}
|
||||
const searchParams = new URLSearchParams(imageId.split('?')[1])
|
||||
for (const [key, value] of searchParams.entries()) {
|
||||
params[key] = value
|
||||
}
|
||||
if (this.visitTaskId === params.visitTaskId) {
|
||||
const studyIndex = params.idx.split('|')[0]
|
||||
const seriesIndex = params.idx.split('|')[1]
|
||||
|
||||
const seriesId = this.studyList[studyIndex].SeriesList[seriesIndex].seriesId
|
||||
const i = this.keySeriesLoad.findIndex(i => i.seriesId === seriesId)
|
||||
if (this.studyList[studyIndex].IsCriticalSequence && percentComplete >= 100) {
|
||||
// 关键序列处理
|
||||
if (i === -1) {
|
||||
this.keySeriesLoad.push({ seriesId: seriesId, loadCount: 1, imageIds: [imageId] })
|
||||
} else {
|
||||
++this.keySeriesLoad[i].loadCount
|
||||
this.keySeriesLoad[i].imageIds.push(imageId)
|
||||
}
|
||||
}
|
||||
if (!this.studyList[studyIndex].IsCriticalSequence && i > -1) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount + 100 * this.keySeriesLoad[i].loadCount
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr = [this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr, this.keySeriesLoad[i].imageIds]
|
||||
this.keySeriesLoad.splice(i, 1)
|
||||
}
|
||||
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
|
||||
if (i > -1) {
|
||||
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
|
||||
this.currentLoadIns[i].percentComplete = percentComplete
|
||||
if (percentComplete === 100) {
|
||||
this.currentLoadIns.splice(i, 1)
|
||||
}
|
||||
} else {
|
||||
if (percentComplete !== 100) {
|
||||
this.currentLoadIns.push({ imageId, percentComplete })
|
||||
}
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete
|
||||
if (this.visitTaskId !== params.visitTaskId) return
|
||||
const percentComplete = e.detail.percentComplete
|
||||
const studyIndex = parseInt(params.idx.split('|')[0])
|
||||
const seriesIndex = parseInt(params.idx.split('|')[1])
|
||||
if (this.markedImages.hasOwnProperty(params.instanceId) && percentComplete >= 100) {
|
||||
const markedImage = this.markedImages[params.instanceId]
|
||||
const pStudyIndex = this.studyList[studyIndex].IsCriticalSequence ? markedImage.studyIndex : 0
|
||||
const pSeriesIndex = this.studyList[studyIndex].IsCriticalSequence ? markedImage.seriesIndex : 0
|
||||
const imageloadedArr = this.studyList[pStudyIndex].SeriesList[pSeriesIndex].imageloadedArr
|
||||
if (imageloadedArr.indexOf(params.instanceId) < 0) {
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].imageloadedArr.push(params.instanceId)
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].prefetchInstanceCount = this.studyList[pStudyIndex].SeriesList[pSeriesIndex].prefetchInstanceCount + 100
|
||||
if (this.studyList[pStudyIndex].SeriesList[pSeriesIndex].imageloadedArr.length >= this.studyList[pStudyIndex].SeriesList[pSeriesIndex].instanceCount) {
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].prefetchInstanceCount = this.studyList[pStudyIndex].SeriesList[pSeriesIndex].instanceCount * 100
|
||||
this.studyList[pStudyIndex].SeriesList[pSeriesIndex].loadStatus = true
|
||||
}
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
|
||||
}
|
||||
}
|
||||
|
||||
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(params.instanceId) < 0) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.instanceId === params.instanceId)
|
||||
if (i > -1) {
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete - this.currentLoadIns[i].percentComplete
|
||||
this.currentLoadIns[i].percentComplete = percentComplete
|
||||
if (percentComplete >= 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
this.currentLoadIns.splice(i, 1)
|
||||
}
|
||||
} else {
|
||||
if (percentComplete !== 100) {
|
||||
this.currentLoadIns.push({ instanceId: params.instanceId, percentComplete })
|
||||
}
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete
|
||||
}
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
|
||||
if (percentComplete >= 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(params.instanceId)
|
||||
}
|
||||
}
|
||||
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||
}
|
||||
},
|
||||
cornerstoneimagecachechanged(e) {
|
||||
const cacheInfo = cornerstone.imageCache.getCacheInfo()
|
||||
|
|
Loading…
Reference in New Issue