From 23f2ea7a3f39d749f2a7f3c26d8f6edffa202afb Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Tue, 16 Apr 2024 10:29:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E8=A7=86=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=BD=93=E5=89=8D=E6=A3=80=E6=9F=A5=E5=BD=B1=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trials.js | 8 +++ src/components/Dicom/DicomViewer.vue | 2 +- src/views/dicom-show/dicom-study.vue | 52 +++++++++++++++++-- .../hirVisit/components/current-study.vue | 6 +-- .../hirVisit/components/studyInfo.vue | 2 +- 5 files changed, 60 insertions(+), 10 deletions(-) diff --git a/src/api/trials.js b/src/api/trials.js index 3abd7fc..c1f8b0e 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -3540,4 +3540,12 @@ export function addOrUpdateSubjectHir(data) { method: 'post', data }) +} + +// 获取患者序列信息 +export function getPatientSeriesList(scpStudyId) { + return request({ + url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`, + method: 'get' + }) } \ No newline at end of file diff --git a/src/components/Dicom/DicomViewer.vue b/src/components/Dicom/DicomViewer.vue index 21cbbc4..be42c98 100644 --- a/src/components/Dicom/DicomViewer.vue +++ b/src/components/Dicom/DicomViewer.vue @@ -393,7 +393,7 @@ export default { this.customWwc = { visible: false, title: this.$t('DicomViewer:data:customWwc') } this.rotateList[0] = '1' this.colorList[0] = '' - this.wwwcList[0] = '1' + this.wwwcList[0] = '-1' this.colormapsList = cornerstone.colors.getColormapsList() this.currentDicomCanvas = this.$refs['dicomCanvas0'] }, diff --git a/src/views/dicom-show/dicom-study.vue b/src/views/dicom-show/dicom-study.vue index 81ca2ab..3fabacb 100644 --- a/src/views/dicom-show/dicom-study.vue +++ b/src/views/dicom-show/dicom-study.vue @@ -110,8 +110,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, setSeriesStatus, getPatientSeriesList } from '@/api/trials' import requestPoolManager from '@/utils/request-pool' import store from '@/store' import { changeURLStatic } from '@/utils/history.js' @@ -175,7 +174,9 @@ export default { this.loadStudy() } else if (this.type === 'Share') { this.loadStudy() - } + } else if (this.type === 'Patient') { + this.loadPatientStudy() + } }, beforeDestroy() { requestPoolManager.stopTaskTimer() @@ -245,6 +246,47 @@ export default { } }) }, + async loadPatientStudy() { + try { + let res = await getPatientSeriesList(this.studyId); + if (res.IsSuccess && res.Result.length > 0) { + console.log(res.Result) + this.modality = res.Result[0].Modality + this.seriesCount = res.Result.length + this.description = res.Result[0].Description + this.seriesList = [] + res.Result.map(item=>{ + var imageIds = [] + item.InstancePathList.forEach(instance => { + imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance}`) + }) + this.seriesList.push({ + imageIds: imageIds, + seriesId: item.SeriesInstanceUid, + seriesUid: item.SeriesInstanceUid, + seriesNumber:item.SeriesNumber, + sliceThickness: item.SliceThickness, + modality: this.modality, + description: this.description, + previewImageUrl: item.ImageResizePath ? this.OSSclientConfig.basePath + item.ImageResizePath : item.ImageResizePath, + instanceCount: item.InstanceCount, + prefetchInstanceCount: 0, + loadStatus: false, + imageloadedArr: [] + }) + }) + if (this.seriesList.length > 0) { + this.$nextTick(() => { + this.loadAllImages() + this.$refs.dicomViewer.loadImageStack(this.seriesList[0]) + this.firstInstanceId = this.seriesList[0].imageIds[0] + }) + } + } + } catch (err) { + console.log(err); + } + }, initSeries() { var scope = this this.studyCode = this.$router.currentRoute.query.studyCode @@ -259,7 +301,7 @@ export default { getInstanceList(seriesId).then(res => { if (!res.Result || (res.Result && res.Result.length === 0)) return var seriesInstanceUid = res.Result[0].SeriesInstanceUid - var sliceLocation = res.Result[0].SliceLocation + var sliceThickness = res.Result[0].SliceThickness var isReading = res.Result[0].IsReading var isDeleted = res.Result[0].IsDeleted var seriesList = [] @@ -275,7 +317,7 @@ export default { seriesId: seriesId, seriesUid: seriesInstanceUid, seriesNumber: seriesNumber, - sliceThickness: sliceLocation, + sliceThickness: sliceThickness, modality: this.modality, description: this.description, isReading, diff --git a/src/views/trials/trials-panel/hirVisit/components/current-study.vue b/src/views/trials/trials-panel/hirVisit/components/current-study.vue index 4c58d43..30e45a5 100644 --- a/src/views/trials/trials-panel/hirVisit/components/current-study.vue +++ b/src/views/trials/trials-panel/hirVisit/components/current-study.vue @@ -2,7 +2,7 @@