Compare commits

..

No commits in common. "eb5fc74d4698d4d292af8260fbc5a41f546a2757" and "53336c5a7c8a7ff8302df2df674036e901e34d6a" have entirely different histories.

1 changed files with 98 additions and 93 deletions

View File

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