diff --git a/src/components/uploadDicomAndNonedicom/dicomFile.vue b/src/components/uploadDicomAndNonedicom/dicomFile.vue index dc26511f..227c2fb4 100644 --- a/src/components/uploadDicomAndNonedicom/dicomFile.vue +++ b/src/components/uploadDicomAndNonedicom/dicomFile.vue @@ -661,17 +661,23 @@ export default { return this.$message.warning( this.$t('trials:uploadDicomList:message:maxFileSize') ) - let StudyInstanceUidList = [] + let StudyInstanceUidList = [], + confirmMessage = null for (let i = 0; i < checkFiles.length; i++) { let item = checkFiles[i] var dicom = await parseDicom(item, 'StudyInstanceUid') let has = true, has2 = false, has3 = false + if (!this.VisitTaskId) { has = this.StudyInstanceUidList.some( (item) => item.StudyInstanceUid === dicom.StudyInstanceUid ) + if (!has) + confirmMessage = this.$t( + 'upload:dicom:confirmMessage:hasNotStudyUid' + ) } else { has2 = this.StudyInstanceUidList.some((item) => { return ( @@ -685,6 +691,10 @@ export default { item.VisitTaskId !== this.VisitTaskId ) }) + if (has2 || has3) + confirmMessage = this.$t( + 'upload:dicom:confirmMessage:visitTaskIdNormal' + ) } if (!has || has2 || has3) { @@ -714,11 +724,14 @@ export default { this.hasOtherStudy = true checkFiles.splice(i, 1) i-- + confirmMessage = this.$t( + 'upload:dicom:confirmMessage:uploadOtherSubject' + ) } } } if (this.hasOtherStudy) { - this.$confirm(this.$t('upload:dicom:confirmMessage:hasNotStudyUid'), { + this.$confirm(confirmMessage, { type: 'warning', distinguishCancelAndClose: true, confirmButtonText: this.$t('common:button:confirm'),