查看访视级别的检查信息bug修复

main
caiyiling 2024-04-29 10:35:10 +08:00
parent 99318cdf3b
commit d378ae1743
1 changed files with 93 additions and 98 deletions

View File

@ -225,62 +225,60 @@ export default {
}, },
methods: { methods: {
// 访 // 访
getStudiesInfo() { async getStudiesInfo() {
this.studyList = [] try {
getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading).then(res => { this.studyList = []
res.Result.forEach((study) => { const res = await getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading)
const data = {} if (res.IsSuccess) {
data.StudyId = study.StudyId res.Result.forEach((study) => {
data.StudyCode = study.StudyCode const data = {}
data.Modalities = study.Modalities data.StudyId = study.StudyId
data.SeriesCount = study.SeriesCount data.StudyCode = study.StudyCode
data.InstanceCount = study.InstanceCount data.Modalities = study.Modalities
data.InstanceCount = study.InstanceCount data.SeriesCount = study.SeriesCount
data.PreviewImageCount = 0 data.InstanceCount = study.InstanceCount
var seriesList = [] data.InstanceCount = study.InstanceCount
study.SeriesList.forEach((series) => { data.PreviewImageCount = 0
const imageIds = [] var seriesList = []
study.SeriesList.forEach((series) => {
// series.InstanceList.forEach((id) => { const imageIds = []
// imageIds.push(`wadouri:/api/instance/content/${id}`) series.InstancePathList.forEach((path) => {
// }) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`)
// series.InstanceList.forEach((id) => { })
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`) seriesList.push({
// }) trialId: this.trialId,
series.InstancePathList.forEach((path) => { subjectVisitId: this.subjectVisitId,
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`) studyId: study.StudyId,
}) imageIds: imageIds,
seriesList.push({ seriesId: series.Id,
trialId: this.trialId, seriesUid: series.SeriesInstanceUid,
subjectVisitId: this.subjectVisitId, seriesNumber: series.SeriesNumber,
studyId: study.StudyId, sliceThickness: series.SliceThickness,
imageIds: imageIds, modality: series.Modality,
seriesId: series.Id, description: series.Description,
seriesUid: series.SeriesInstanceUid, isReading: series.IsReading,
seriesNumber: series.SeriesNumber, isDeleted: series.IsDeleted,
sliceThickness: series.SliceThickness, previewImageUrl: series.ImageResizePath ? this.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}`,
modality: series.Modality, instanceCount: series.InstanceCount,
description: series.Description, prefetchInstanceCount: 0,
isReading: series.IsReading, loadStatus: false,
isDeleted: series.IsDeleted, imageloadedArr: []
previewImageUrl: series.ImageResizePath ? this.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}`, })
instanceCount: series.InstanceCount,
prefetchInstanceCount: 0,
loadStatus: false,
imageloadedArr: []
}) })
data.SeriesList = seriesList
this.studyList.push(data)
}) })
data.SeriesList = seriesList if (this.studyList.length > 0) {
this.studyList.push(data) this.$refs.dicomViewer.loadImageStack(this.studyList[0].SeriesList[0])
}) const imageId = this.studyList[0].SeriesList[0].imageIds[0]
if (this.studyList.length > 0) { let instanceId = imageId.split('/')[imageId.split('/').length - 1]
this.$refs.dicomViewer.loadImageStack(this.studyList[0].SeriesList[0]) instanceId = instanceId.split('.')[0]
const imageId = this.studyList[0].SeriesList[0].imageIds[0] this.firstInstanceId = instanceId
let instanceId = imageId.split('/')[imageId.split('/').length - 1] }
instanceId = instanceId.split('.')[0]
this.firstInstanceId = instanceId
} }
}) } catch (e) {
console.log(e)
}
}, },
showSeriesImage(e, studyIndex, seriesIndex, series) { showSeriesImage(e, studyIndex, seriesIndex, series) {
const element = e.currentTarget const element = e.currentTarget
@ -377,12 +375,11 @@ export default {
} }
}, },
// //
getRelationSeriesByStudy(studyId, index) { async getRelationSeriesByStudy(studyId, index) {
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()
} else { } else {
const scope = this
const loading = this.$loading({ const loading = this.$loading({
target: document.querySelector(`.relation-study-wrapper-${index}`), target: document.querySelector(`.relation-study-wrapper-${index}`),
fullscreen: false, fullscreen: false,
@ -391,50 +388,48 @@ export default {
background: 'rgb(49 49 49 / 50%)', background: 'rgb(49 49 49 / 50%)',
spinner: 'el-icon-loading' spinner: 'el-icon-loading'
}) })
getStudyInfo(studyId).then(data => { try {
scope.relationStudyList[index].studyCode = data.Result.StudyCode const basePath = this.OSSclientConfig.basePath
scope.relationStudyList[index].modality = data.Result.Modalities const data = await getStudyInfo(studyId)
scope.relationStudyList[index].seriesCount = data.Result.SeriesCount if (!data.IsSuccess) {
getSeriesList(`/series/list/${studyId}`).then(data => {
loading.close() loading.close()
if (data.Result != null && data.Result.length > 0) { return
var seriesList = [] }
const res = data.Result this.relationStudyList[index].studyCode = data.Result.StudyCode
res.forEach(function(item) { this.relationStudyList[index].modality = data.Result.Modalities
const imageIds = [] this.relationStudyList[index].seriesCount = data.Result.SeriesCount
// item.InstanceList.forEach(function(id) { getSeriesList(`/series/list/${studyId}`).then(res => {
// imageIds.push(`wadouri:/api/instance/content/${id}`) var seriesList = []
// }) res.Result.forEach(function(item) {
// item.InstanceList.forEach((id) => { const imageIds = []
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`) item.InstancePathList.forEach((path) => {
// }) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? basePath : basePath}${path}`)
item.InstancePathList.forEach((path) => {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${path}`)
})
seriesList.push({
imageIds: imageIds,
seriesId: item.Id,
seriesUid: item.SeriesInstanceUid,
seriesNumber: item.SeriesNumber,
sliceThickness: item.SliceThickness,
modality: item.Modality,
description: item.Description,
previewImageUrl: item.ImageResizePath ? this.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
instanceCount: item.InstanceCount,
prefetchInstanceCount: 0,
hasLabel: item.HasLabel,
keySeries: item.KeySeries,
loadStatus: false,
imageloadedArr: []
})
}) })
scope.relationStudyList[index].seriesCount = seriesList.length seriesList.push({
scope.relationStudyList[index].seriesList = seriesList imageIds: imageIds,
scope.relationStudyList[index].showSeries = true seriesId: item.Id,
scope.$forceUpdate() seriesUid: item.SeriesInstanceUid,
} seriesNumber: item.SeriesNumber,
}).catch(() => { loading.close() }) sliceThickness: item.SliceThickness,
}).catch(() => { loading.close() }) modality: item.Modality,
description: item.Description,
previewImageUrl: item.ImageResizePath ? basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
instanceCount: item.InstanceCount,
prefetchInstanceCount: 0,
loadStatus: false,
imageloadedArr: []
})
})
this.relationStudyList[index].seriesCount = seriesList.length
this.relationStudyList[index].seriesList = seriesList
this.relationStudyList[index].showSeries = true
this.$forceUpdate()
loading.close()
})
} catch (e) {
console.log(e)
loading.close()
}
} }
}, },
showRelationSeriesImage(e, series, index) { showRelationSeriesImage(e, series, index) {
@ -552,7 +547,7 @@ export default {
cornerstoneImageLoaded(e) { cornerstoneImageLoaded(e) {
if (e.detail.image.imageId.includes(this.firstInstanceId) && !this.isStartLoad) { if (e.detail.image.imageId.includes(this.firstInstanceId) && !this.isStartLoad) {
// //
this.loadAllImages() // this.loadAllImages()
this.isStartLoad = true this.isStartLoad = true
// requestPoolManager.executeTask() // requestPoolManager.executeTask()
} }