ir下载目录结构变更

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-09 15:14:43 +08:00
parent 1538690604
commit eba09135eb
1 changed files with 45 additions and 42 deletions

View File

@ -314,49 +314,52 @@ export default {
} }
}, },
// //
formatDownloadFile(data) { formatDownloadFile(list) {
let files = [], let files = [],
name = `${data.SubjectCode}_${data.VisitName}.zip` name = `${list[0].SubjectCode}_${new Date().getTime()}.zip`
if (data.StudyList && data.StudyList.length > 0) { list.forEach((data) => {
let StudyList = data.StudyList if (data.StudyList && data.StudyList.length > 0) {
StudyList.forEach((study) => { let StudyList = data.StudyList
if (study.SeriesList.length > 0) { StudyList.forEach((study) => {
study.SeriesList.forEach((series) => { if (study.SeriesList.length > 0) {
if (series.InstancePathList.length > 0) { study.SeriesList.forEach((series) => {
series.InstancePathList.forEach((instance) => { if (series.InstancePathList.length > 0) {
let fileName = instance.Path.split('/').pop() series.InstancePathList.forEach((instance) => {
let obj = { let fileName = instance.Path.split('/').pop()
name: `${data.SubjectCode}_${data.VisitName}/${this.$fd( let obj = {
'IsDicom', name: `${data.SubjectCode}/${data.VisitName}/${this.$fd(
true 'IsDicom',
)}/${study.StudyCode}/${fileName}`, true
url: this.OSSclientConfig.basePath + instance.Path, )}/${study.StudyCode}/${fileName}`,
} url: this.OSSclientConfig.basePath + instance.Path,
files.push(obj) }
}) files.push(obj)
} })
}) }
} })
}) }
} })
if (data.NoneDicomStudyList && data.NoneDicomStudyList.length > 0) { }
let NoneDicomStudyList = data.NoneDicomStudyList if (data.NoneDicomStudyList && data.NoneDicomStudyList.length > 0) {
// let NoneDicomStudyList = data.NoneDicomStudyList
NoneDicomStudyList.forEach((study) => { //
if (study.FileList.length > 0) { NoneDicomStudyList.forEach((study) => {
study.FileList.forEach((item) => { if (study.FileList.length > 0) {
let obj = { study.FileList.forEach((item) => {
name: `${data.SubjectCode}_${data.VisitName}/${this.$fd( let obj = {
'IsDicom', name: `${data.SubjectCode}/${data.VisitName}/${this.$fd(
false 'IsDicom',
)}/${study.StudyCode}/${item.FileName}`, false
url: this.OSSclientConfig.basePath + item.Path, )}/${study.StudyCode}/${item.FileName}`,
} url: this.OSSclientConfig.basePath + item.Path,
files.push(obj) }
}) files.push(obj)
} })
}) }
} })
}
})
return { files, name } return { files, name }
}, },
handleOpenDialog(item) { handleOpenDialog(item) {