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