pacs影像预览
parent
e961829ef1
commit
c64e555238
|
@ -3827,6 +3827,13 @@ export function getDicomModalityList(params) {
|
|||
params
|
||||
})
|
||||
}
|
||||
// 获取患者序列信息
|
||||
export function getPatientSeriesList(scpStudyId) {
|
||||
return request({
|
||||
url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 获取反馈列表
|
||||
export function getUserFeedBackList(data) {
|
||||
return request({
|
||||
|
|
|
@ -138,7 +138,7 @@ import * as cornerstone from 'cornerstone-core'
|
|||
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||
import dicomViewer from '@/components/Dicom/DicomViewer'
|
||||
import { getStudyInfo, getSeriesList } from '@/api/reading'
|
||||
import { getInstanceList, setSeriesStatus } from '@/api/trials'
|
||||
import { getInstanceList, getPatientSeriesList, setSeriesStatus } from '@/api/trials'
|
||||
|
||||
import requestPoolManager from '@/utils/request-pool'
|
||||
import store from '@/store'
|
||||
|
@ -219,6 +219,8 @@ export default {
|
|||
this.loadStudy()
|
||||
} else if (this.type === 'Share') {
|
||||
this.loadStudy()
|
||||
} else if (this.type === 'Patient') {
|
||||
this.loadPatientStudy()
|
||||
}
|
||||
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||
window.addEventListener('beforeunload', e => {
|
||||
|
@ -247,6 +249,65 @@ export default {
|
|||
this.getSeriesList(url)
|
||||
}
|
||||
},
|
||||
async loadPatientStudy() {
|
||||
try {
|
||||
let data = await getPatientSeriesList(this.studyId);
|
||||
if (data.IsSuccess) {
|
||||
const { Result } = data
|
||||
var seriesList = []
|
||||
Result.forEach((item, index) => {
|
||||
const imageIds = []
|
||||
item.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
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 {
|
||||
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 studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
seriesList.push({
|
||||
trialId,
|
||||
subjectVisitId,
|
||||
studyId,
|
||||
imageIds: imageIds,
|
||||
instanceInfoList: item.InstanceInfoList,
|
||||
seriesId: item.Id,
|
||||
seriesUid: item.SeriesInstanceUid,
|
||||
seriesNumber: item.SeriesNumber,
|
||||
sliceThickness: item.SliceThickness,
|
||||
modality: item.Modality,
|
||||
description: item.Description,
|
||||
isReading: item.IsReading,
|
||||
isDeleted: item.IsDeleted,
|
||||
previewImageUrl: item.ImageResizePath ? this.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
|
||||
instanceCount: item.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
hasLabel: item.HasLabel,
|
||||
keySeries: item.KeySeries,
|
||||
tpCode: this.tpCode,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: item.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
this.seriesList = seriesList
|
||||
if (this.seriesList.length > 0) {
|
||||
this.loadAllImages()
|
||||
this.$refs.dicomViewer.loadImageStack(this.seriesList[0], this.labels[this.tpCode])
|
||||
this.firstInstanceId = this.seriesList[0].imageIds[0]
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async getSeriesList(url) {
|
||||
try {
|
||||
const data = await getSeriesList(url)
|
||||
|
|
|
@ -260,7 +260,7 @@ export default {
|
|||
image(item) {
|
||||
let token = getToken();
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showdicom?studyId=${item.SCPStudyId}&TokenKey=${token}&type=Study`,
|
||||
path: `/showdicom?studyId=${item.SCPStudyId}&TokenKey=${token}&type=Patient`,
|
||||
});
|
||||
this.newWindow = window.open(routeData.href, "_blank");
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue