质控下载影像更改

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

View File

@ -171,7 +171,7 @@
class="viewernavigatorwrapper"
style="position: relative;border:1px solid #434343;"
series-type="relation"
@click="showRelationSeriesImage($event,seriesItem,index)"
@click="showRelationSeriesImage($event,seriesItem,studyIndex,index)"
>
<!-- <el-image
class="image-preview"
@ -347,9 +347,12 @@ export default {
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}`)
}
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}`)
} 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}`)
}
})
@ -394,16 +397,14 @@ export default {
},
loadImages(series, seriesIndex) {
console.log('loadImages')
var priority = parseInt(new Date().getTime())
console.log(series)
if (series.isExistMutiFrames) {
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 {
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) {
@ -434,11 +435,11 @@ export default {
var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) {
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 {
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) {
@ -487,11 +488,11 @@ export default {
var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) {
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 {
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) {
console.log('getRelationSeriesByStudy')
if (this.relationStudyList[index].seriesCount) {
this.relationStudyList[index].showSeries = !this.relationStudyList[index].showSeries
this.$forceUpdate()
@ -660,7 +660,7 @@ export default {
}
}
},
showRelationSeriesImage(e, series, index) {
showRelationSeriesImage(e, series, studyIndex, index) {
this.currentRelationIndex = index
const element = e.currentTarget
const elements = document.querySelectorAll('[series-type]')
@ -671,9 +671,15 @@ export default {
this.$refs.dicomViewer.loadImageStack(series)
if (!series.loadStatus) {
var priority = parseInt(new Date().getTime())
series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
})
if (series.isExistMutiFrames) {
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() {
@ -682,21 +688,14 @@ export default {
if (seriesIndex === -1) return
const series = seriesList[seriesIndex]
var priority = parseInt(new Date().getTime())
for (let i = 0; i < series.imageIds.length; i++) {
const imageId = series.imageIds[i]
if (series.isExistMutiFrames) {
const params = this.getInstanceInfo(imageId)
if (params.frame && params.frame > 0) {
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 })
if (series.isExistMutiFrames) {
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 })
})
}
if (this.imageList.length > 0) {
this.loopLoad()
@ -738,24 +737,19 @@ export default {
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]
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 && this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.length < this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
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
const studyIndex = params.idx.split('|')[0]
const seriesIndex = params.idx.split('|')[1]
var series = !params.isRelation ? this.studyList[studyIndex].SeriesList[seriesIndex] : null
if (!series) return
var prefetchInstanceCount = series.prefetchInstanceCount
var instanceCount = series.instanceCount
if (series.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) {
@ -960,18 +954,6 @@ export default {
border: 1px solid #2c2c2c;
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{
height: 50px;
padding: 5px;