重新上传流程
continuous-integration/drone/push Build is passing Details

uat_us
熊飞 2024-01-23 17:03:55 +08:00
parent cca1e8ce73
commit c4b83701e3
1 changed files with 27 additions and 8 deletions

View File

@ -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()
}
})
},