diff --git a/src/api/reading.js b/src/api/reading.js index 0ac49b93..f29b086b 100644 --- a/src/api/reading.js +++ b/src/api/reading.js @@ -488,3 +488,24 @@ export function getFilterTableQuestion(data) { data }) } +export function deleteImageCache(params) { + return request({ + url: `/Study/deleteImageCache`, + method: 'delete', + params + }) +} +export function getAnonymizeInfo(params) { + return request({ + url: `/Study/getAnonymizeInfo`, + method: 'get', + params + }) +} +export function updateModality(params) { + return request({ + url: `/Study/updateModality`, + method: 'put', + params + }) +} diff --git a/src/components/Dicom/DicomCanvas.vue b/src/components/Dicom/DicomCanvas.vue index 68d8a4c7..5ee13cd1 100644 --- a/src/components/Dicom/DicomCanvas.vue +++ b/src/components/Dicom/DicomCanvas.vue @@ -213,6 +213,10 @@ export default { }, methods: { + getInfo() { + var image = cornerstone.getImage(this.canvas) + return image + }, loadImageStack(dicomSeries, text = '') { this.tip = text this.$nextTick(() => { diff --git a/src/components/Dicom/DicomViewer.vue b/src/components/Dicom/DicomViewer.vue index 20b902c0..3c7fe074 100644 --- a/src/components/Dicom/DicomViewer.vue +++ b/src/components/Dicom/DicomViewer.vue @@ -296,6 +296,13 @@ +
+ + +
+ @@ -382,6 +389,7 @@ import { editPatientInfo } from '@/api/trials' import { setPTClinicalDataForInstance, clearPTClinicalDataCache } from '@/utils/ptClinicalDataCache' +import { changeFile } from "@/views/trials/trials-panel/reading/dicoms/components/upload.js" export default { name: 'DicomsViewer', components: { @@ -400,6 +408,14 @@ export default { modality: { type: String, default: '' + }, + SeriesList: { + type: Array, + default: () => [] + }, + currentSeriesIndex: { + type: Number, + default: -1 } }, watch: { @@ -483,7 +499,9 @@ export default { }, formLoading: false, type: '', - isEdit: 0 + isEdit: 0, + fileKey: null, + file: null, } }, computed: { @@ -511,6 +529,19 @@ export default { }, methods: { + beginScanFiles(e, key) { + this.fileKey = key + this.file = e.target.files[0] + let image = this.$refs[this.activeItem].getInfo() + let study = { + seriesList: this.SeriesList, + currentSeriesIndex: this.currentSeriesIndex + } + this.$emit("update:loading", true) + changeFile('CRC', this.file, study, image) + + // DicomEvent.$emit('getStudyFile') + }, setToolsPassive() { const elements = document.querySelectorAll('.dicom-item') const scope = this diff --git a/src/components/uploadDicomAndNonedicom/dicomFile.vue b/src/components/uploadDicomAndNonedicom/dicomFile.vue index 32dac322..4b27f3df 100644 --- a/src/components/uploadDicomAndNonedicom/dicomFile.vue +++ b/src/components/uploadDicomAndNonedicom/dicomFile.vue @@ -61,7 +61,8 @@ scope.row.UploadStudyList.length <= 0 " @click.stop="handleViewReadingImages(scope.row)" :title="$t('upload:dicom:button:preview')" /> - + @@ -380,6 +381,10 @@ export default { isReading: { type: Boolean, default: false, + }, + StudyInstanceUID: { + type: String, + default: '', } }, components: { @@ -1081,11 +1086,12 @@ export default { async verifyStudy() { this.btnLoading = true var studyList = [] + let scope = this this.selectArr.forEach((item) => { item.dicomInfo.uploadFileSize = 0 if (!item.uploadState.selected) { studyList.push({ - studyInstanceUid: item.dicomInfo.studyUid, + studyInstanceUid: scope.isReading && scope.StudyInstanceUID ? scope.StudyInstanceUID : item.dicomInfo.studyUid, studyDate: item.dicomInfo.studyTime, }) } @@ -1180,7 +1186,7 @@ export default { let t = setInterval(() => { dicomUploadInProgress({ trialId: scope.trialId, - studyInstanceUid: dicomInfo.studyUid, + studyInstanceUid: scope.isReading && scope.StudyInstanceUID ? scope.StudyInstanceUID : dicomInfo.studyUid, VisitTaskId: dicomInfo.visitTaskId, }).then((res) => { console.log(dicomInfo.visitTaskId) @@ -1207,7 +1213,7 @@ export default { dicomInfo.RadiopharmaceuticalStartTime, studyId: dicomInfo.studyId, - studyInstanceUid: dicomInfo.studyUid, + studyInstanceUid: scope.isReading && scope.StudyInstanceUID ? scope.StudyInstanceUID : dicomInfo.studyUid, studyTime: dicomInfo.studyTime, description: dicomInfo.description, seriesCount: dicomInfo.seriesNum, @@ -1302,146 +1308,157 @@ export default { // Record.FileCount++ // } // else { - let path = `/${params.trialId}/Image/${params.subjectId - }/${params.subjectVisitId}/${dicomInfo.visitTaskId + let path = `/${params.trialId}/Image/${params.subjectId + }/${params.subjectVisitId}/${dicomInfo.visitTaskId + }/${scope.getGuid( + dicomInfo.studyUid + + v.seriesUid + + o.instanceUid + + params.trialId + )}` + if (scope.IsImageSegment) { + path = `/${params.trialId}/Image/${params.subjectId + }/${params.subjectVisitId}/AnnotationImage/${dicomInfo.visitTaskId }/${scope.getGuid( dicomInfo.studyUid + v.seriesUid + o.instanceUid + params.trialId )}` - if (scope.IsImageSegment) { - path = `/${params.trialId}/Image/${params.subjectId - }/${params.subjectVisitId}/AnnotationImage/${dicomInfo.visitTaskId - }/${scope.getGuid( - dicomInfo.studyUid + - v.seriesUid + - o.instanceUid + - params.trialId - )}` - } - if (scope.isClose) return - let res = await dcmUpload( - { - path: path, - file: o.file, - speed: true, - }, - null, - (percentage, checkpoint, lastPer) => { - dicomInfo.uploadFileSize += - checkpoint.size * (percentage - lastPer) - if ( - dicomInfo.uploadFileSize > dicomInfo.fileSize - ) { - dicomInfo.uploadFileSize = dicomInfo.fileSize + } + if (scope.isClose) return + let res = await dcmUpload( + { + path: path, + file: o.file, + speed: true, + }, + scope.isReading && scope.StudyInstanceUID ? { + AnonymizeFixedList: [ + { + Element: '000D', + Group: '0020', + ReplaceValue: scope.StudyInstanceUID, + Id: 'StudyInstanceUID' } - }, - { - fileName: o.file.name, - fileSize: o.file.size, - fileType: 'application/dicom', - uploadBatchId: uploadBatchId, - batchDataType: 5, - trialId: params.trialId, - subjectId: params.subjectId, - subjectVisitId: params.subjectVisitId, + ], + AnonymizeNotFixedList: [], + DicomStoreInfo: {} + } : null, + (percentage, checkpoint, lastPer) => { + dicomInfo.uploadFileSize += + checkpoint.size * (percentage - lastPer) + if ( + dicomInfo.uploadFileSize > dicomInfo.fileSize + ) { + dicomInfo.uploadFileSize = dicomInfo.fileSize } - ) - if (!res || !res.url) { - params.failedFileCount++ - } else { - if (ii === 0 && o.modality !== 'SR') { - try { - let fileId = - cornerstoneWADOImageLoader.wadouri.fileManager.add( - o.file - ) - let blob = await scope.dicomToPng( - fileId, - o.imageColumns, - o.imageRows + }, + { + fileName: o.file.name, + fileSize: o.file.size, + fileType: 'application/dicom', + uploadBatchId: uploadBatchId, + batchDataType: 5, + trialId: params.trialId, + subjectId: params.subjectId, + subjectVisitId: params.subjectVisitId, + } + ) + if (!res || !res.url) { + params.failedFileCount++ + } else { + if (ii === 0 && o.modality !== 'SR') { + try { + let fileId = + cornerstoneWADOImageLoader.wadouri.fileManager.add( + o.file ) - let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg` - if (scope.IsImageSegment) { - thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/AnnotationImage/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg` - } - let OSSclient = scope.OSSclient - let seriesRes = await OSSclient.put( - thumbnailPath, - blob, - { - fileName: `${v.seriesUid}.jpg`, - fileSize: blob.size, - fileType: 'image/jpeg', - uploadBatchId: uploadBatchId, - batchDataType: 6, - trialId: params.trialId, - subjectId: params.subjectId, - subjectVisitId: params.subjectVisitId, - } - ) - if (seriesRes && seriesRes.url) { - ImageResizePath = scope.$getObjectName( - seriesRes.url - ) - } - } catch (e) { - console.log(e) + let blob = await scope.dicomToPng( + fileId, + o.imageColumns, + o.imageRows + ) + let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg` + if (scope.IsImageSegment) { + thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/AnnotationImage/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg` } + let OSSclient = scope.OSSclient + let seriesRes = await OSSclient.put( + thumbnailPath, + blob, + { + fileName: `${v.seriesUid}.jpg`, + fileSize: blob.size, + fileType: 'image/jpeg', + uploadBatchId: uploadBatchId, + batchDataType: 6, + trialId: params.trialId, + subjectId: params.subjectId, + subjectVisitId: params.subjectVisitId, + } + ) + if (seriesRes && seriesRes.url) { + ImageResizePath = scope.$getObjectName( + seriesRes.url + ) + } + } catch (e) { + console.log(e) } } - if (res && res.url) { - instanceList.push({ - studyInstanceUid: dicomInfo.studyUid, - seriesInstanceUid: v.seriesUid, - sopInstanceUid: o.instanceUid, - SOPClassUID: o.SOPClassUID, - TransferSytaxUID: o.TransferSytaxUID, - MediaStorageSOPInstanceUID: - o.MediaStorageSOPInstanceUID, - MediaStorageSOPClassUID: - o.MediaStorageSOPClassUID, - instanceNumber: o.instanceNumber, - instanceTime: o.instanceTime, - imageRows: o.imageRows, - imageColumns: o.imageColumns, - sliceLocation: o.sliceLocation, - sliceThickness: o.sliceThickness, - numberOfFrames: o.numberOfFrames, - pixelSpacing: o.pixelSpacing, - imagerPixelSpacing: o.imagerPixelSpacing, - frameOfReferenceUID: o.frameOfReferenceUID, - windowCenter: o.windowCenter, - windowWidth: o.windowWidth, - path: scope.$getObjectName(res.url), - FileSize: o.FileSize, + } + if (res && res.url) { + instanceList.push({ + studyInstanceUid: scope.isReading && scope.StudyInstanceUID ? scope.StudyInstanceUID : dicomInfo.studyUid, + seriesInstanceUid: v.seriesUid, + sopInstanceUid: o.instanceUid, + SOPClassUID: o.SOPClassUID, + TransferSytaxUID: o.TransferSytaxUID, + MediaStorageSOPInstanceUID: + o.MediaStorageSOPInstanceUID, + MediaStorageSOPClassUID: + o.MediaStorageSOPClassUID, + instanceNumber: o.instanceNumber, + instanceTime: o.instanceTime, + imageRows: o.imageRows, + imageColumns: o.imageColumns, + sliceLocation: o.sliceLocation, + sliceThickness: o.sliceThickness, + numberOfFrames: o.numberOfFrames, + pixelSpacing: o.pixelSpacing, + imagerPixelSpacing: o.imagerPixelSpacing, + frameOfReferenceUID: o.frameOfReferenceUID, + windowCenter: o.windowCenter, + windowWidth: o.windowWidth, + path: scope.$getObjectName(res.url), + FileSize: o.FileSize, - PhotometricInterpretation: - o.PhotometricInterpretation, - BitsAllocated: o.BitsAllocated, - PixelRepresentation: o.PixelRepresentation, - RescaleIntercept: o.RescaleIntercept, - RescaleSlope: o.RescaleSlope, - ImagePositionPatient: o.ImagePositionPatient, - ImageOrientationPatient: - o.ImageOrientationPatient, - SequenceOfUltrasoundRegions: - o.SequenceOfUltrasoundRegions, - FrameTime: o.FrameTime, - CorrectedImage: o.CorrectedImage, - Units: o.Units, - DecayCorrection: o.DecayCorrection, - EncapsulatedDocument: o.EncapsulatedDocument, - }) - o.myPath = scope.$getObjectName(res.url) - Record.Uploaded.push(name) - dicomInfo.failedFileCount++ - Record.FileCount++ - } else { - Record.Failed.push(name) - Record.FileCount++ - } + PhotometricInterpretation: + o.PhotometricInterpretation, + BitsAllocated: o.BitsAllocated, + PixelRepresentation: o.PixelRepresentation, + RescaleIntercept: o.RescaleIntercept, + RescaleSlope: o.RescaleSlope, + ImagePositionPatient: o.ImagePositionPatient, + ImageOrientationPatient: + o.ImageOrientationPatient, + SequenceOfUltrasoundRegions: + o.SequenceOfUltrasoundRegions, + FrameTime: o.FrameTime, + CorrectedImage: o.CorrectedImage, + Units: o.Units, + DecayCorrection: o.DecayCorrection, + EncapsulatedDocument: o.EncapsulatedDocument, + }) + o.myPath = scope.$getObjectName(res.url) + Record.Uploaded.push(name) + dicomInfo.failedFileCount++ + Record.FileCount++ + } else { + Record.Failed.push(name) + Record.FileCount++ + } // } resolve1() } catch (e) { @@ -1460,7 +1477,7 @@ export default { } } params.study.seriesList.push({ - studyInstanceUid: dicomInfo.studyUid, + studyInstanceUid: scope.isReading && scope.StudyInstanceUID ? scope.StudyInstanceUID : dicomInfo.studyUid, seriesInstanceUid: v.seriesUid, seriesNumber: v.seriesNumber, seriesTime: v.seriesTime, diff --git a/src/components/uploadDicomAndNonedicom/index.vue b/src/components/uploadDicomAndNonedicom/index.vue index c5f19dbd..5eee327a 100644 --- a/src/components/uploadDicomAndNonedicom/index.vue +++ b/src/components/uploadDicomAndNonedicom/index.vue @@ -7,7 +7,7 @@ + :isReading="isReading" :StudyInstanceUID="StudyInstanceUID" /> { @@ -15,9 +16,11 @@ export const anonymization = function (file, config) { let dataset = dcmjs.data.DicomMessage.readFile(buffer) for (var i = 0; i < AnonymizeFixedList.length; i++) { let AnonymizeFixed = AnonymizeFixedList[i] - if (!dataset.dict.hasOwnProperty(`${AnonymizeFixed.Group + AnonymizeFixed.Element}`)) continue + if (!dataset.dict.hasOwnProperty(`${AnonymizeFixed.Group + AnonymizeFixed.Element}`) && !dataset.meta.hasOwnProperty(`${AnonymizeFixed.Group + AnonymizeFixed.Element}`)) continue if (dataset.dict[AnonymizeFixed.Group + AnonymizeFixed.Element]) { dataset.dict[AnonymizeFixed.Group + AnonymizeFixed.Element].Value[0] = AnonymizeFixed.ReplaceValue + } else if (dataset.meta[AnonymizeFixed.Group + AnonymizeFixed.Element]) { + dataset.meta[AnonymizeFixed.Group + AnonymizeFixed.Element].Value[0] = AnonymizeFixed.ReplaceValue } else { dataset.dict[AnonymizeFixed.Group + AnonymizeFixed.Element] = { vr: AnonymizeFixed.ValueRepresentation, @@ -60,7 +63,7 @@ export const anonymization = function (file, config) { let newDicomFile = dataset.write() // fragmentMultiframe 原始数据是否进行分割 const bufferArray = new Uint8Array(newDicomFile) const blob = new Blob([bufferArray], { type: 'application/octet-stream' }) - resolve({ blob, pixelDataElement }) + resolve({ blob, pixelDataElement, Modality: dataset.dict['00080060'].Value[0] }) } catch (err) { console.log(file, 'warning') console.log(err) diff --git a/src/utils/dcmUpload/dcmUpload.js b/src/utils/dcmUpload/dcmUpload.js index 768deb2a..6dc4ac59 100644 --- a/src/utils/dcmUpload/dcmUpload.js +++ b/src/utils/dcmUpload/dcmUpload.js @@ -12,7 +12,8 @@ export const dcmUpload = async function (data, config, progressFn, fileInfo) { let res = await Vue.prototype.OSSclient.multipartUpload(Object.assign(data, { file: blob.blob }), progressFn, fileInfo) resolve({ ...res, - image: blob.pixelDataElement + image: blob.pixelDataElement, + Modality: blob.Modality }) // let OSSclientA = await OSSclient // let blob = await encoder(file) diff --git a/src/utils/oss.js b/src/utils/oss.js index 119a371f..0105c95d 100644 --- a/src/utils/oss.js +++ b/src/utils/oss.js @@ -40,7 +40,7 @@ async function ossGenerateSTS() { return new Promise(async (resolve, reject) => { try { let _vm = router.default.app - if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') { + if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload' && _vm._route.path !== '/readingDicoms' && _vm._route.path !== '/showdicom') { var objectItem = objectName.split('/') // objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] objectItem[objectItem.length - 1] = `${objectItem[objectItem.length - 1].substring( @@ -57,13 +57,13 @@ async function ossGenerateSTS() { const trialId = urlParams.get('trialId') if (Object.keys(fileInfo).length !== 0) { fileInfo.fileType = mimeTypeToExt(fileInfo.fileType) - let params = Object.assign({path: objectName}, fileInfo) + let params = Object.assign({ path: objectName }, fileInfo) addOrUpdateFileUploadRecord(params) } else if (trialId) { const fileName = objectName.split('/').pop() - const fileType = fileName.includes('.') - ? fileName.split('.').pop().toLowerCase() - : '' + const fileType = fileName.includes('.') + ? fileName.split('.').pop().toLowerCase() + : '' let params = { trialId, path: objectName, fileName, fileType } addOrUpdateFileUploadRecord(params) } @@ -97,7 +97,7 @@ async function ossGenerateSTS() { OSSclient = new OSS(Vue.prototype.OSSclientConfig); } let _vm = router.default.app - if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') { + if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload' && _vm._route.path !== '/readingDicoms' && _vm._route.path !== '/showdicom') { var objectItem = data.path.split('/') // objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] objectItem[objectItem.length - 1] = `${objectItem[objectItem.length - 1].substring( @@ -114,17 +114,17 @@ async function ossGenerateSTS() { const trialId = urlParams.get('trialId') if (Object.keys(fileInfo).length !== 0) { fileInfo.fileType = mimeTypeToExt(fileInfo.fileType) - let params = Object.assign({path: data.path}, fileInfo) + let params = Object.assign({ path: data.path }, fileInfo) addOrUpdateFileUploadRecord(params) } else if (trialId) { const fileName = data.path.split('/').pop() - const fileType = fileName.includes('.') - ? fileName.split('.').pop().toLowerCase() - : '' + const fileType = fileName.includes('.') + ? fileName.split('.').pop().toLowerCase() + : '' let params = { trialId, path: data.path, fileName, fileType } addOrUpdateFileUploadRecord(params) } - + resolve({ name: data.path, url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(res.name) @@ -151,7 +151,7 @@ async function ossGenerateSTS() { try { var name = objectName.split('/')[objectName.split('/').length - 1] let _vm = router.default.app - if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') { + if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload' && _vm._route.path !== '/readingDicoms' && _vm._route.path !== '/showdicom') { var objectItem = objectName.split('/') objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] objectName = objectItem.join('/') @@ -225,7 +225,7 @@ function uploadAWS(aws, data, progress, fileInfo) { const { file, path } = data; if (!file || !path) return reject('file and path be required'); let _vm = router.default.app - if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') { + if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload' && _vm._route.path !== '/readingDicoms' && _vm._route.path !== '/showdicom') { var objectItem = data.path.split('/') // objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] objectItem[objectItem.length - 1] = `${objectItem[objectItem.length - 1].substring( @@ -246,13 +246,13 @@ function uploadAWS(aws, data, progress, fileInfo) { const trialId = urlParams.get('trialId') if (Object.keys(fileInfo).length !== 0) { fileInfo.fileType = mimeTypeToExt(fileInfo.fileType) - let params = Object.assign({path: decodeUtf8(curPath)}, fileInfo) + let params = Object.assign({ path: decodeUtf8(curPath) }, fileInfo) addOrUpdateFileUploadRecord(params) } else if (trialId) { const fileName = decodeUtf8(curPath).split('/').pop() - const fileType = fileName.includes('.') - ? fileName.split('.').pop().toLowerCase() - : '' + const fileType = fileName.includes('.') + ? fileName.split('.').pop().toLowerCase() + : '' let params = { trialId, path: decodeUtf8(curPath), fileName, fileType } addOrUpdateFileUploadRecord(params) } diff --git a/src/views/dicom-show/dicom-study.vue b/src/views/dicom-show/dicom-study.vue index dc72218a..263fa580 100644 --- a/src/views/dicom-show/dicom-study.vue +++ b/src/views/dicom-show/dicom-study.vue @@ -125,7 +125,8 @@
+ :modality="modality" :Comparison.sync="isComparison" :SeriesList="seriesList" + :currentSeriesIndex="currentSeriesIndex" @loadStudy="loadStudy" />
@@ -708,7 +712,8 @@ + :visit-task-id="taskId" :is-reading-task-view-in-order="isReadingTaskViewInOrder" :isReading="true" + :StudyInstanceUID="StudyInstanceUID" /> @@ -767,6 +772,8 @@ import const_ from '@/const/sign-code' import { changeURLStatic } from '@/utils/history.js' import SystemInfo from "@/utils/systemInfo"; import md5 from 'js-md5' +import { changeFile } from "./upload.js" +import dcmjs from '@/utils/dcmUpload/dcmjs' export default { name: 'DicomViewer', components: { @@ -845,6 +852,10 @@ export default { default() { return true } + }, + Loading: { + type: Boolean, + default: false } }, data() { @@ -978,7 +989,10 @@ export default { fullScreenWidth: window.innerWidth - 570 + 'px', fullScreenHeight: window.innerHeight - 130 + 'px', - ManualsClose: false + ManualsClose: false, + fileKey: null, + file: null, + StudyInstanceUID: null } }, @@ -1213,6 +1227,12 @@ export default { this.AspectRatio = windowWidth / windowHeight }; this.getSystemInfoReading() + DicomEvent.$on('sendStudyFile', (study) => { + let image = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getInfo() + study.visitTaskList = this.visitTaskList + this.$emit("update:Loading", true) + changeFile('IR', this.file, study, image) + }) }, beforeDestroy() { DicomEvent.$off('updateImage') @@ -1236,6 +1256,11 @@ export default { }) }, methods: { + beginScanFiles(e, key) { + this.fileKey = key + this.file = e.target.files[0] + DicomEvent.$emit('getStudyFile') + }, handleReadingChart(e) { this.$emit('handleReadingChart', e) }, @@ -1283,6 +1308,10 @@ export default { if (idx > -1) { this.taskId = this.visitTaskList[idx].VisitTaskId } + let image = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getInfo() + let dataset = dcmjs.data.DicomMessage.readFile(image.data.byteArray.buffer) + this.StudyInstanceUID = dataset.dict['0020000D'].Value[0] + dataset = null this.uploadSubjectCode = localStorage.getItem("subjectCode") this.uploadSubjectId = localStorage.getItem("subjectId") this.uploadTrialCriterion = this.trialCriterion diff --git a/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue index 124bfd84..2c76b760 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue @@ -1,5 +1,5 @@
-
+
-
- +
+
#{{ series.seriesNumber }}
-
+
- - + +
- - + +
- +
-
+
{{ instance.InstanceNumber }}
-
{{ `${instance.NumberOfFrames > 0 ? instance.KeyFramesList.length > 0 ? instance.KeyFramesList.length : instance.NumberOfFrames : 1} frame` }}
+
{{ `${instance.NumberOfFrames > 0 ? instance.KeyFramesList.length > 0 ? + instance.KeyFramesList.length : instance.NumberOfFrames : 1} frame` }}
- +
@@ -131,7 +120,7 @@
{{ series.description }}
- +

@@ -145,9 +134,11 @@

-
+
- + @@ -155,10 +146,10 @@
-
- +
+
@@ -168,24 +159,19 @@
- +
- - + +
- +
@@ -296,6 +282,9 @@ export default { var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId) this.measureData = this.visitTaskList[idx].MeasureData }) + DicomEvent.$on("getStudyFile", () => { + DicomEvent.$emit('sendStudyFile', { studyList: this.studyList, studyIndex: this.studyIndex, seriesIndex: this.seriesIndex, visitTaskId: this.visitTaskId }) + }) // DicomEvent.$on('setReadingState', readingTaskState => { // var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId) @@ -320,7 +309,7 @@ export default { methods: { debounce(fn, delay) { let timer = null - return function() { + return function () { const context = this const args = arguments clearTimeout(timer) @@ -334,7 +323,7 @@ export default { // 初始化待渲染序列 this.getInitSeries().then((res) => { requestPoolManager.startTaskTimer() - res.map(async(item) => { + res.map(async (item) => { // this.loadInitialImage(item) const imageId = item.imageIds[item.imageIdIndex] const p = parseInt(new Date().getTime()) @@ -456,8 +445,8 @@ export default { this.studyIndex = obj.studyIndex this.seriesIndex = obj.seriesIndex seriesList.push(obj.series) - this.activeNames = [`${this.studyList[ this.studyIndex].StudyId}`] - this.studyList[ obj.studyIndex].SeriesList[obj.seriesIndex].isFirstRender = true + this.activeNames = [`${this.studyList[this.studyIndex].StudyId}`] + this.studyList[obj.studyIndex].SeriesList[obj.seriesIndex].isFirstRender = true } else { if (this.studyList.length > 0) { // 初始化问题表单 @@ -494,7 +483,7 @@ export default { this.studyIndex = secondObj.studyIndex this.seriesIndex = secondObj.seriesIndex seriesList.push(secondObj.series) - this.studyList[ secondObj.studyIndex].SeriesList[secondObj.seriesIndex].isFirstRender = true + this.studyList[secondObj.studyIndex].SeriesList[secondObj.seriesIndex].isFirstRender = true this.studyIndex = secondObj.studyIndex this.seriesIndex = secondObj.seriesIndex @@ -527,7 +516,7 @@ export default { // const instanceList = seriesList[srIdx].instanceList const imageIds = seriesList[srIdx].imageIds // const filterStr = seriesList[srIdx].isExistMutiFrames ? `frame=${measureDatas[i].MeasureData.frame}&instanceId=${measureDatas[i].InstanceId}` : `instanceId=${measureDatas[i].InstanceId}` - let instanceIndex = seriesList[srIdx].instanceInfoList.findIndex(k=>k.Id === measureDatas[i].InstanceId) + let instanceIndex = seriesList[srIdx].instanceInfoList.findIndex(k => k.Id === measureDatas[i].InstanceId) let filterStr = '' if (instanceIndex > -1 && seriesList[srIdx].isExistMutiFrames) { if (seriesList[srIdx].instanceInfoList[instanceIndex].NumberOfFrames > 0) { @@ -611,7 +600,7 @@ export default { // const instanceList = seriesList[srIdx].imageIds const imageIds = seriesList[srIdx].imageIds // const filterStr = seriesList[srIdx].isExistMutiFrames ? `frame=${measureDatas[mIdx].MeasureData.frame}&instanceId=${measureDatas[mIdx].InstanceId}` : `instanceId=${measureDatas[mIdx].InstanceId}` - let instanceIndex = seriesList[srIdx].instanceInfoList.findIndex(i=>i.Id === measureDatas[mIdx].InstanceId) + let instanceIndex = seriesList[srIdx].instanceInfoList.findIndex(i => i.Id === measureDatas[mIdx].InstanceId) let filterStr = '' if (instanceIndex > -1 && seriesList[srIdx].isExistMutiFrames) { if (seriesList[srIdx].instanceInfoList[instanceIndex].NumberOfFrames > 0) { @@ -968,15 +957,17 @@ export default { }