质控下载影像更改

uat_us
caiyiling 2024-07-31 11:22:13 +08:00
parent 7f8d08032c
commit ddd35f4ff8
2 changed files with 85 additions and 87 deletions

View File

@ -68,13 +68,11 @@
<div>{{ instance.InstanceNumber }}</div> <div>{{ instance.InstanceNumber }}</div>
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div> <div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
</div> </div>
</div> </div>
</div> </div>
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" /> <i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
</el-popover> </el-popover>
</div> </div>
</div> </div>
<div v-show="item.instanceCount" style="padding: 1px;"> <div v-show="item.instanceCount" style="padding: 1px;">
{{ item.modality }}: {{ item.instanceCount }} image {{ item.modality }}: {{ item.instanceCount }} image
@ -250,8 +248,11 @@ export default {
for (let j = 0; j < i.NumberOfFrames; j++) { for (let j = 0; j < i.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
} }
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&seriesIndex=${index}`
} else { } else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`) const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`
imageIds.push(imageId)
i.ImageId = imageId
} }
}) })
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
@ -315,15 +316,19 @@ export default {
let isExistMutiFrames = false let isExistMutiFrames = false
const instanceInfoList = [] const instanceInfoList = []
res.Result.forEach(instance => { res.Result.forEach(instance => {
let imageId = ''
if (instance.NumberOfFrames > 1) { if (instance.NumberOfFrames > 1) {
for (let i = 0; i < instance.NumberOfFrames; i++) { for (let i = 0; i < instance.NumberOfFrames; i++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`)
} }
isExistMutiFrames = true isExistMutiFrames = true
imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=0&instanceId=${instance.Id}&seriesIndex=0`
} else { } else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`) const path = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`
imageIds.push(path)
imageId = path
} }
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path }) instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId })
}) })
seriesList.push({ seriesList.push({
trialId, trialId,
@ -378,13 +383,22 @@ export default {
} }
if (!isAddToTakPool) { if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
// var images = []
// if (series.isExistMutiFrames) {
// images = series.imageIds.filter(i => i.includes('?frame=0'))
// } else {
// images = series.imageIds
// }
// images.map(imageId => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
@ -431,13 +445,22 @@ export default {
} }
if (!isAddToTakPool) { if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
// if (series.isExistMutiFrames) {
// series.instanceInfoList.map(image => {
// this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
// } else {
// series.imageIds.map((imageId) => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
// }
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
}) })
} else { } else {
series.imageIds.map((imageId) => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
}) })
} }
@ -578,29 +601,22 @@ export default {
if (seriesIndex === -1) return if (seriesIndex === -1) return
const series = this.seriesList[seriesIndex] const series = this.seriesList[seriesIndex]
var priority = new Date().getTime() var priority = new Date().getTime()
// for (let i = 0; i < series.imageIds.length; i++) { // var images = []
// const imageId = series.imageIds[i] // if (series.isExistMutiFrames) {
// if (series.isExistMutiFrames) { // images = series.imageIds.filter(i => i.includes('?frame=0'))
// const params = this.getInstanceInfo(imageId) // } else {
// if (params.frame && params.frame > 0) { // images = series.imageIds
// continue
// }
// }
// var p = null
// if (this.firstInstanceId === imageId) {
// p = priority * 100
// } else {
// p = priority - 1
// }
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
// } // }
// images.map(imageId => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.Path, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {

View File

@ -171,7 +171,7 @@
class="viewernavigatorwrapper" class="viewernavigatorwrapper"
style="position: relative;border:1px solid #434343;" style="position: relative;border:1px solid #434343;"
series-type="relation" series-type="relation"
@click="showRelationSeriesImage($event,seriesItem,index)" @click="showRelationSeriesImage($event,seriesItem,studyIndex,index)"
> >
<!-- <el-image <!-- <el-image
class="image-preview" class="image-preview"
@ -347,9 +347,12 @@ export default {
for (let j = 0; j < i.NumberOfFrames; j++) { for (let j = 0; j < i.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
} }
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`) // imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
} else { } else {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`) const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`
imageIds.push(imageId)
i.ImageId = imageId
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`) // imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
} }
}) })
@ -394,16 +397,14 @@ export default {
}, },
loadImages(series, seriesIndex) { loadImages(series, seriesIndex) {
console.log('loadImages')
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
console.log(series)
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.Path, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
@ -434,11 +435,11 @@ export default {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
@ -487,11 +488,11 @@ export default {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.Path, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
}) })
} else { } else {
series.imageIds.map((imageId) => { series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
}) })
} }
@ -600,7 +601,6 @@ export default {
}, },
// //
async getRelationSeriesByStudy(studyId, index) { async getRelationSeriesByStudy(studyId, index) {
console.log('getRelationSeriesByStudy')
if (this.relationStudyList[index].seriesCount) { if (this.relationStudyList[index].seriesCount) {
this.relationStudyList[index].showSeries = !this.relationStudyList[index].showSeries this.relationStudyList[index].showSeries = !this.relationStudyList[index].showSeries
this.$forceUpdate() this.$forceUpdate()
@ -660,7 +660,7 @@ export default {
} }
} }
}, },
showRelationSeriesImage(e, series, index) { showRelationSeriesImage(e, series, studyIndex, index) {
this.currentRelationIndex = index this.currentRelationIndex = index
const element = e.currentTarget const element = e.currentTarget
const elements = document.querySelectorAll('[series-type]') const elements = document.querySelectorAll('[series-type]')
@ -671,9 +671,15 @@ export default {
this.$refs.dicomViewer.loadImageStack(series) this.$refs.dicomViewer.loadImageStack(series)
if (!series.loadStatus) { if (!series.loadStatus) {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
series.imageIds.map(imageId => { if (series.isExistMutiFrames) {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) series.instanceInfoList.map(image => {
}) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
})
} else {
series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
})
}
} }
}, },
loadAllImages() { loadAllImages() {
@ -682,21 +688,14 @@ export default {
if (seriesIndex === -1) return if (seriesIndex === -1) return
const series = seriesList[seriesIndex] const series = seriesList[seriesIndex]
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
for (let i = 0; i < series.imageIds.length; i++) { if (series.isExistMutiFrames) {
const imageId = series.imageIds[i] series.instanceInfoList.map(image => {
if (series.isExistMutiFrames) { this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
const params = this.getInstanceInfo(imageId) })
if (params.frame && params.frame > 0) { } else {
continue series.imageIds.map((imageId) => {
} this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
} })
var p = null
if (this.firstInstanceId === imageId) {
p = priority * 100
} else {
p = priority - 1
}
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
this.loopLoad() this.loopLoad()
@ -738,24 +737,19 @@ export default {
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) { const studyIndex = params.idx.split('|')[0]
const studyIndex = params.idx.split('|')[0] const seriesIndex = params.idx.split('|')[1]
const seriesIndex = params.idx.split('|')[1] var series = !params.isRelation ? this.studyList[studyIndex].SeriesList[seriesIndex] : null
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount if (!series) return
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount var prefetchInstanceCount = series.prefetchInstanceCount
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0 && this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.length < this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) { var instanceCount = series.instanceCount
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId) if (series.imageloadedArr.indexOf(imageId) < 0) {
if (i > -1) { const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete if (i > -1) {
this.currentLoadIns[i].percentComplete = percentComplete prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
if (percentComplete === 100) { this.currentLoadIns[i].percentComplete = percentComplete
this.currentLoadIns.splice(i, 1) if (percentComplete === 100) {
} this.currentLoadIns.splice(i, 1)
} else {
if (percentComplete !== 100) {
this.currentLoadIns.push({ imageId, percentComplete })
}
prefetchInstanceCount = prefetchInstanceCount + percentComplete
} }
} else { } else {
if (percentComplete !== 100) { if (percentComplete !== 100) {
@ -960,18 +954,6 @@ export default {
border: 1px solid #2c2c2c; border: 1px solid #2c2c2c;
padding: 5px; padding: 5px;
} }
.frame_list{
max-height: 500px;
overflow-y: auto;
}
.instance_frame_wrapper ::-webkit-scrollbar {
width: 7px;
height: 7px;
}
.instance_frame_wrapper ::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #d0d0d0;
}
.frame_content{ .frame_content{
height: 50px; height: 50px;
padding: 5px; padding: 5px;