diff --git a/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue b/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue index 4489832c..7613cd67 100644 --- a/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue +++ b/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue @@ -567,7 +567,8 @@ export default { relationInfo: null, trialBodyPartTypes: [], trialModalitys: [], - myInterval: [] + myInterval: [], + studyErrorList: [] } }, mounted() { @@ -881,6 +882,7 @@ export default { // 上传之前校验基本信息及检查是否已上传 beginUploadQueues() { this.scanState = 'uploading' + this.studyErrorList = [] console.log(this.uploadQueues, this.selectArr) this.warningArr = [] for (let i = 0; i < this.selectArr.length; ++i) { @@ -1019,6 +1021,15 @@ export default { }) this.$refs.pathClear.value = '' this.btnLoading = false + if (this.studyErrorList.length > 0) { + let msg = this.$t('trials:uploadDicomFiles2:message:studyErrorList') + msg = msg.replaceAll('xxx', this.studyErrorList.join('、')) + this.$confirm(msg, this.$t('trials:hotkeys:message:tip'), { + confirmButtonText: this.$t('trials:uploadDicomFiles2:button:reupload') + }).then(() => { + this.beginUploadQueues() + }) + } }) }).catch(_ => { this.btnLoading = false }) }, @@ -1242,7 +1253,15 @@ export default { let text = JSON.stringify(Record) let logJsonBlob = scope.generateTxtFile(text) let logJsonObjectName = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt` - let logRes = await scope.OSSclient.put(logJsonObjectName, logJsonBlob) + let logRes + try { + logRes = await scope.OSSclient.put(logJsonObjectName, logJsonBlob) + } catch (e) { + scope.uploadQueues[index].uploadState.record = Record + scope.studyErrorList.push(dicomInfo.accNumber) + clearInterval(t) + resolve() + } for (let i = 0; i < seriesList.length; i++) { let v = seriesList[i] let o = params.study.seriesList.find(o => { @@ -1269,7 +1288,7 @@ export default { if (dicomInfo.failedFileCount === dicomInfo.fileCount) { scope.$message.success(scope.$t('trials:uploadDicomList:label:uploaded')) } else { - scope.$alert(scope.$t('trials:uploadDicomList:label:uploadFailed')) + scope.studyErrorList.push(dicomInfo.accNumber) } scope.uploadQueues[index].uploadState.record = Record scope.getStudyInfo() @@ -1279,21 +1298,21 @@ export default { clearInterval(t) resolve() }).catch((res) => { - reject() scope.uploadQueues[index].uploadState.record = Record - scope.$alert(scope.$t('trials:uploadDicomList:label:generateLogFailed')) + scope.studyErrorList.push(dicomInfo.accNumber) clearInterval(t) + resolve() }) } else { - reject() scope.uploadQueues[index].uploadState.record = Record - scope.$alert(scope.$t('trials:uploadDicomList:label:generateLogFailed')) + scope.studyErrorList.push(dicomInfo.accNumber) clearInterval(t) + resolve() } }) } catch (e) { console.log(e) - reject() + resolve() } }) },