From 20c257be4f7ecd5e4ff77ea2e4f813fc10c686e1 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 19 Nov 2025 15:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E5=89=8D=E5=AF=B9=E5=BD=B1?= =?UTF-8?q?=E5=83=8F=E8=BF=9B=E8=A1=8C=E9=9D=B6=E6=AE=B5=E6=A0=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trials.js | 9 + .../downloadDicomAndNonedicom/index.vue | 72 +++- .../uploadDicomAndNonedicom/dicomFile.vue | 39 +- .../uploadDicomAndNonedicom/index.vue | 54 +-- .../uploadDicomAndNonedicom/nonedicomFile.vue | 33 +- .../reading-task/components/TargetSection.vue | 160 +++++++++ .../reading/reading-task/index.vue | 333 ++++++------------ 7 files changed, 424 insertions(+), 276 deletions(-) create mode 100644 src/views/trials/trials-panel/reading/reading-task/components/TargetSection.vue diff --git a/src/api/trials.js b/src/api/trials.js index becea280..664adc5c 100644 --- a/src/api/trials.js +++ b/src/api/trials.js @@ -4281,4 +4281,13 @@ export function deleteAuditRecord(auditRecordId) { url: `/AuditDocument/deleteAuditRecord/${auditRecordId}`, method: 'delete' }) +} + +// 靶段标注列表 +export function getTrialSubjectVisitMarkList(data) { + return request({ + url: `/DownloadAndUpload/getTrialSubjectVisitMarkList`, + method: 'post', + data + }) } \ No newline at end of file diff --git a/src/components/downloadDicomAndNonedicom/index.vue b/src/components/downloadDicomAndNonedicom/index.vue index 920e1a4c..60efa567 100644 --- a/src/components/downloadDicomAndNonedicom/index.vue +++ b/src/components/downloadDicomAndNonedicom/index.vue @@ -34,9 +34,12 @@ + + + sortable v-else /> @@ -126,6 +129,10 @@ export default { return {} }, }, + IsImageSegment: { + type: Boolean, + default: false, + } }, data() { return { @@ -157,6 +164,7 @@ export default { this.bodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId) this.getList() this.title = `Download Images:${this.SubjectCode}(${this.Criterion.TrialReadingCriterionName})` + if (this.IsImageSegment) this.title = `Download Images:${this.SubjectCode}` }, beforeDestroy() { store.dispatch('trials/setUnLock', false) @@ -175,6 +183,12 @@ export default { if (this.TaskId) { this.searchData.VisitTaskId = this.TaskId } + if (this.IsImageSegment) { + this.searchData.IsImageSegmentLabel = true + } + else if (this.Criterion.CriterionType == 19 || this.Criterion.CriterionType == 20) { + this.searchData.IsImageSegmentLabel = false + } this.loading = true let res = await getSubjectImageDownloadSelectList(this.searchData) this.loading = false @@ -257,6 +271,12 @@ export default { data.NoneDicomStudyIdList = [...data.NoneDicomStudyIdList, ...arr] } } + if (this.IsImageSegment) { + data.IsImageSegmentLabel = true + } + else if (this.Criterion.CriterionType == 19 || this.Criterion.CriterionType == 20) { + data.IsImageSegmentLabel = false + } this.btnLoading = true let res = await getIRReadingDownloadStudyInfo(data) this.btnLoading = false @@ -286,13 +306,18 @@ export default { formatDownloadFile(list) { let files = [], name = `${list[0].SubjectCode}_${new Date().getTime()}.zip` - if (this.IsReadingTaskViewInOrder === 1) { - name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip` - } - if (this.IsReadingTaskViewInOrder === 0) { - // name = `${list[0].TaskBlindName}.zip` - name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip` + if (this.IsImageSegment) { + name = `${list[0].SubjectCode}_${list[0].VisitName}.zip` + } else { + if (this.IsReadingTaskViewInOrder === 1) { + name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip` + } + if (this.IsReadingTaskViewInOrder === 0) { + // name = `${list[0].TaskBlindName}.zip` + name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip` + } } + list.forEach((data) => { if (data.StudyList && data.StudyList.length > 0) { let StudyList = data.StudyList @@ -304,7 +329,14 @@ export default { }/DICOMDIR`, url: this.OSSclientConfig.basePath + study.StudyDIRPath, } - if (this.IsReadingTaskViewInOrder === 0) { + if (this.IsImageSegment) { + obj = { + name: `${data.SubjectCode}/${data.VisitName + }/${this.$fd('IsDicom', true)}/${study.StudyCode + }/DICOMDIR`, + url: this.OSSclientConfig.basePath + study.StudyDIRPath, + } + } else if (this.IsReadingTaskViewInOrder === 0) { obj = { name: `${data.TaskBlindName}/${this.$fd( 'IsDicom', @@ -330,7 +362,15 @@ export default { url: this.OSSclientConfig.basePath + instance.Path, IsEncapsulated: instance.IsEncapsulated } - if (this.IsReadingTaskViewInOrder === 0) { + if (this.IsImageSegment) { + obj = { + name: `${data.SubjectCode}/${data.VisitName + }/${this.$fd('IsDicom', true)}/${study.StudyCode + }/IMAGE/${fileName}`, + url: this.OSSclientConfig.basePath + instance.Path, + IsEncapsulated: instance.IsEncapsulated + } + } else if (this.IsReadingTaskViewInOrder === 0) { obj = { name: `${data.TaskBlindName}/${this.$fd( 'IsDicom', @@ -360,7 +400,16 @@ export default { )}/${study.StudyCode}/${item.FileName}`, url: this.OSSclientConfig.basePath + item.Path, } - if (this.IsReadingTaskViewInOrder === 0) { + if (this.IsImageSegment) { + obj = { + name: `${data.SubjectCode}/${data.VisitName}/${this.$fd( + 'IsDicom', + false + )}/${study.StudyCode}/${item.FileName}`, + url: this.OSSclientConfig.basePath + item.Path, + } + } + else if (this.IsReadingTaskViewInOrder === 0) { obj = { name: `${data.TaskBlindName}/${this.$fd( 'IsDicom', @@ -390,6 +439,9 @@ export default { }, handleOpenDialog(item) { this.model_cfg.title = `${item.SubjectCode || ''} > ${item.TaskBlindName}` + if (this.IsImageSegment) { + this.model_cfg.title = `${item.SubjectCode || ''} > ${item.VisitName}` + } if (item.IsDicom) { this.modelList = item.DicomStudyList } else { diff --git a/src/components/uploadDicomAndNonedicom/dicomFile.vue b/src/components/uploadDicomAndNonedicom/dicomFile.vue index d0c9c48e..3f91050c 100644 --- a/src/components/uploadDicomAndNonedicom/dicomFile.vue +++ b/src/components/uploadDicomAndNonedicom/dicomFile.vue @@ -363,12 +363,17 @@ export default { type: Number, default: 0, }, + IsImageSegment: { + type: Boolean, + default: false, + } }, components: { 'study-view': studyView, }, data() { return { + loading: false, list: [], StudyInstanceUidList: [], SopInstanceUidList: [], @@ -439,6 +444,12 @@ export default { if (this.TaskId) { params.VisitTaskId = this.TaskId } + if (this.IsImageSegment) { + this.searchData.IsImageSegmentLabel = true + } + else if (this.Criterion.CriterionType == 19 || this.Criterion.CriterionType == 20) { + this.searchData.IsImageSegmentLabel = false + } this.loading = true let res = await getSubjectImageUploadList(params) this.loading = false @@ -536,6 +547,9 @@ export default { if (this.VisitTaskId) { data.VisitTaskId = this.VisitTaskId } + if (this.IsImageSegment) { + data.IsImageSegmentLabel = true + } let res = await verifyIRStudyAllowUpload(data) if (res.IsSuccess) { return res.Result @@ -562,8 +576,9 @@ export default { confirmMessage = null for (let i = 0; i < checkFiles.length; i++) { let item = checkFiles[i] - var dicom = await parseDicom(item, 'StudyInstanceUid') + var dicom = await parseDicom(item, ['StudyInstanceUid', 'Modality']) if (!dicom.StudyInstanceUid) continue + if (this.IsImageSegment && dicom.Modality !== 'US') continue let has = true, has2 = false, has3 = false @@ -1153,6 +1168,16 @@ export default { o.instanceUid + params.trialId )}` + if (this.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( { @@ -1186,6 +1211,9 @@ export default { o.imageRows ) let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg` + if (this.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, @@ -1277,6 +1305,9 @@ export default { let text = JSON.stringify(Record) let logJsonBlob = scope.generateTxtFile(text) let logJsonObjectName = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt` + if (this.IsImageSegment) { + logJsonObjectName = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/AnnotationImage/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt` + } let logRes try { logRes = await scope.OSSclient.put( @@ -1305,6 +1336,9 @@ export default { v.instanceList[0].imageRows ) let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.jpg` + if (this.IsImageSegment) { + thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/AnnotationImage/${dicomInfo.studyUid}/${v.seriesUid}.jpg` + } let OSSclient = scope.OSSclient try { let seriesRes = await OSSclient.put(thumbnailPath, blob) @@ -1322,6 +1356,9 @@ export default { if (scope.isClose) return false console.log(params) params.VisitTaskId = dicomInfo.visitTaskId + if (this.IsImageSegment) { + params.IsImageSegmentLabel = true + } addOrUpdateArchiveTaskStudy(params) .then((res) => { if (dicomInfo.failedFileCount === dicomInfo.fileCount) { diff --git a/src/components/uploadDicomAndNonedicom/index.vue b/src/components/uploadDicomAndNonedicom/index.vue index fb364a44..dd9264f5 100644 --- a/src/components/uploadDicomAndNonedicom/index.vue +++ b/src/components/uploadDicomAndNonedicom/index.vue @@ -1,40 +1,17 @@ + + \ No newline at end of file diff --git a/src/views/trials/trials-panel/reading/reading-task/index.vue b/src/views/trials/trials-panel/reading/reading-task/index.vue index a9cbff5b..8b844be0 100644 --- a/src/views/trials/trials-panel/reading/reading-task/index.vue +++ b/src/views/trials/trials-panel/reading/reading-task/index.vue @@ -1,272 +1,152 @@