ir上传dicom
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-05 18:01:05 +08:00
parent f52b2f151b
commit e52378d5d4
2 changed files with 19 additions and 6 deletions

View File

@ -417,6 +417,7 @@
<study-view <study-view
v-if="model_cfg.visible" v-if="model_cfg.visible"
:model_cfg="model_cfg" :model_cfg="model_cfg"
:IsDicom="true"
:modelList="modelList" :modelList="modelList"
/> />
</div> </div>
@ -1172,7 +1173,7 @@ export default {
o.imageColumns, o.imageColumns,
o.imageRows o.imageRows
) )
let thumbnailPath = `/${params.trialId}/Image/${params.trialSiteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}.png` let thumbnailPath = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${v.seriesUid}.png`
let OSSclient = scope.OSSclient let OSSclient = scope.OSSclient
let seriesRes = await OSSclient.put( let seriesRes = await OSSclient.put(
thumbnailPath, thumbnailPath,
@ -1257,7 +1258,7 @@ export default {
} }
let text = JSON.stringify(Record) let text = JSON.stringify(Record)
let logJsonBlob = scope.generateTxtFile(text) let logJsonBlob = scope.generateTxtFile(text)
let logJsonObjectName = `/${params.trialId}/Image/${params.trialSiteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt` let logJsonObjectName = `/${params.trialId}/Image/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.visitTaskId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt`
let logRes let logRes
try { try {
logRes = await scope.OSSclient.put( logRes = await scope.OSSclient.put(
@ -1302,7 +1303,7 @@ export default {
params.RecordPath = scope.$getObjectName(logRes.url) params.RecordPath = scope.$getObjectName(logRes.url)
if (scope.isClose) return false if (scope.isClose) return false
console.log(params) console.log(params)
params.VisitTaskId = dicomInfo.VisitTaskId params.VisitTaskId = dicomInfo.visitTaskId
addOrUpdateArchiveTaskStudy(params) addOrUpdateArchiveTaskStudy(params)
.then((res) => { .then((res) => {
if (dicomInfo.failedFileCount === dicomInfo.fileCount) { if (dicomInfo.failedFileCount === dicomInfo.fileCount) {
@ -1336,7 +1337,8 @@ export default {
resolve() resolve()
} }
}) })
.catch(() => { .catch((err) => {
console.log(err)
let Record = { let Record = {
Failed: [], Failed: [],
Existed: [], Existed: [],
@ -1376,6 +1378,17 @@ export default {
reason() reason()
}) })
}, },
canvasToBlob(canvas) {
return new Promise((resolve) => {
canvas.toBlob((blob) => {
resolve(blob)
})
})
},
generateTxtFile(text) {
let blob = new Blob(['\ufeff', text], { type: 'text/plain' })
return blob
},
}, },
} }
</script> </script>

View File

@ -1467,7 +1467,7 @@ export default {
name: `${data.SubjectCode}_${data.VisitName}_${this.$fd( name: `${data.SubjectCode}_${data.VisitName}_${this.$fd(
'IsDicom', 'IsDicom',
true true
)}/${study.StudyCode}_${study.StudyTime}_${ )}/${study.StudyCode}_${study.StudyTime.split(" ")[0]}_${
series.Modality series.Modality
}/${fileName}`, }/${fileName}`,
url: this.OSSclientConfig.basePath + instance.Path, url: this.OSSclientConfig.basePath + instance.Path,
@ -1504,7 +1504,7 @@ export default {
name: `${data.SubjectCode}_${data.VisitName}_${this.$fd( name: `${data.SubjectCode}_${data.VisitName}_${this.$fd(
'IsDicom', 'IsDicom',
true true
)}/${study.StudyCode}_${study.ImageDate}_${study.Modality}/${ )}/${study.StudyCode}_${study.ImageDate.split(" ")[0]}_${study.Modality}/${
item.FileName item.FileName
}`, }`,
url: this.OSSclientConfig.basePath + item.Path, url: this.OSSclientConfig.basePath + item.Path,