修改阅片页面自动下载流程

uat_us
caiyiling 2024-01-25 16:36:28 +08:00
parent 221bf9c52f
commit d595552543
3 changed files with 84 additions and 17 deletions

View File

@ -822,9 +822,9 @@ export default {
this.getWwcTpl() this.getWwcTpl()
// cornerstone.imageCache.setMaximumSizeBytes(0) // cornerstone.imageCache.setMaximumSizeBytes(0)
const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB // const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
// const maximumSizeInBytes = 1024 * 1024 * 500 // // const maximumSizeInBytes = 1024 * 1024 * 500
cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes) // cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
this.customWwc = { visible: false, title: this.$t('trials:reading:dagTitle:wwwcCustom') } this.customWwc = { visible: false, title: this.$t('trials:reading:dagTitle:wwwcCustom') }
this.CriterionType = parseInt(localStorage.getItem('CriterionType')) this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
if (this.CriterionType === 10) { if (this.CriterionType === 10) {

View File

@ -690,7 +690,8 @@ export default {
await store.dispatch('reading/setCurrentReadingTaskState', 2) await store.dispatch('reading/setCurrentReadingTaskState', 2)
var isAutoTask = await this.getAutoTaskVal() var isAutoTask = await this.getAutoTaskVal()
if (isAutoTask) { if (isAutoTask) {
DicomEvent.$emit('getNextTask') // DicomEvent.$emit('getNextTask')
window.location.reload()
} else { } else {
// '' // ''
this.$confirm(this.$t('trials:readingReport:message:msg4'), { this.$confirm(this.$t('trials:readingReport:message:msg4'), {
@ -698,7 +699,8 @@ export default {
distinguishCancelAndClose: true distinguishCancelAndClose: true
}) })
.then(() => { .then(() => {
DicomEvent.$emit('getNextTask') window.location.reload()
// DicomEvent.$emit('getNextTask')
}) })
.catch(action => { .catch(action => {
changeURLStatic('visitTaskId', this.visitTaskId) changeURLStatic('visitTaskId', this.visitTaskId)

View File

@ -56,9 +56,9 @@
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" /> <i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
</el-tooltip> </el-tooltip>
<!-- 暂停 --> <!-- 暂停 -->
<el-tooltip v-else class="item" effect="dark" :content="$t('trials:reading:button:pause')" placement="bottom"> <!-- <el-tooltip v-else class="item" effect="dark" :content="$t('trials:reading:button:pause')" placement="bottom">
<i class="el-icon-video-pause" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="stopLoadSeries(series,index,i)" /> <i class="el-icon-video-pause" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="stopLoadSeries(series,index,i)" />
</el-tooltip> </el-tooltip> -->
</div> </div>
<el-tooltip v-else-if="series.isDicom && series.prefetchInstanceCount === 0 &&series.modality!== 'SR'" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom"> <el-tooltip v-else-if="series.isDicom && series.prefetchInstanceCount === 0 &&series.modality!== 'SR'" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
<i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" /> <i class="el-icon-video-play" style="font-size: 18px;margin-right: 5px;color: #ffeb3b;cursor: pointer;" @click.stop="loadSeries(series,index,i)" />
@ -224,13 +224,63 @@ export default {
// } // }
// }) // })
cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded) cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
// cornerstone.events.addEventListener('cornerstoneimagecachefull', this.cornerstoneimagecachefull)
// cornerstone.events.addEventListener('cornerstoneimagecachechanged', this.cornerstoneimagecachechanged)
}, },
beforeDestroy() { beforeDestroy() {
cornerstone.imageCache.purgeCache() cornerstone.imageCache.purgeCache()
DicomEvent.$off('refreshStudyListMeasureData') DicomEvent.$off('refreshStudyListMeasureData')
}, },
methods: { methods: {
initStudyInfo() { initStudyInfo(){
const loading = this.$loading({ fullscreen: true })
//
this.getInitSeries().then((res) => {
requestPoolManager.startTaskTimer()
res.map((item) => {
this.loadInitialImage(item)
})
console.log(res)
var i = res.findIndex(s => s.isCurrentTask)
if (i > -1) {
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
if (idx > -1) {
this.measureData = this.visitTaskList[idx].MeasureData
this.studyList = this.visitTaskList[idx].StudyList
var priority = parseInt(new Date().getTime()) * 10
res[i].imageIds.map(image=>{
priority --
this.imageList.push({ imageId: image, seriesId: res[i].seriesId, studyIndex: res[i].studyIndex, seriesIndex: res[i].seriesIndex, visitTaskId: res[i].visitTaskId, priority })
})
// this.studyList.map((study, studyIndex) => {
// study.SeriesList.map((series, seriesIndex) => {
// if (series.modality !== 'SR') {
// series.imageIds.map(image => {
// let priority = 0
// if (series.seriesId === res[i].seriesId) {
// priority = parseInt(new Date().getTime()) * 10
// } else {
// priority = --p
// }
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
// })
// }
// })
// })
this.loopLoad()
}
}
DicomEvent.$emit('loadImageStacks', res)
loading.close()
this.isRender = true
}).catch(() => {
loading.close()
})
},
initStudyInfo2() {
console.log('initStudyInfo') console.log('initStudyInfo')
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
// //
@ -625,19 +675,27 @@ export default {
this.studyList.map((study, studyIndex) => { this.studyList.map((study, studyIndex) => {
study.SeriesList.map((series, seriesIndex) => { study.SeriesList.map((series, seriesIndex) => {
if (!series.loadStatus && series.isDicom && series.modality !== 'SR') { if (!series.loadStatus && series.isDicom && series.modality !== 'SR') {
if (isCurrentTask || isBaseLineTask) { // if (isCurrentTask || isBaseLineTask) {
// /线 // // /线
series.imageIds.map(image => { // series.imageIds.map(image => {
priority = priority - 1 // priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority }) // this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
}) // })
} else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) { // } else if (!isBaseLineTask && !isCurrentTask && study.IsCriticalSequence) {
// 访 // // 访
// series.imageIds.map(image => {
// priority = priority - 1
// this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
// })
// }
//
if(!isCurrentTask && study.IsCriticalSequence){
series.imageIds.map(image => { series.imageIds.map(image => {
priority = priority - 1 priority = priority - 1
this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority }) this.imageList.push({ imageId: image, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
}) })
} }
} }
}) })
}) })
@ -732,7 +790,14 @@ export default {
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
} }
} }
} },
cornerstoneimagecachechanged(e){
const cacheInfo = cornerstone.imageCache.getCacheInfo()
console.log(cacheInfo)
},
cornerstoneimagecachefull(e){
console.log('超过内存了')
},
} }
} }
</script> </script>