影像汇总导出影像、关键图
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-06-11 16:34:46 +08:00
parent 613d434af9
commit 3489d34628
2 changed files with 73 additions and 5 deletions

View File

@ -61,8 +61,17 @@
<el-table-column prop="TotalStudyCount" min-width="120" <el-table-column prop="TotalStudyCount" min-width="120"
:label="$t('trials:imageSummary:table:TotalStudyCount')" show-overflow-tooltip sortable="custom" /> :label="$t('trials:imageSummary:table:TotalStudyCount')" show-overflow-tooltip sortable="custom" />
<!-- 影像类型 --> <!-- 影像类型 -->
<!-- <el-table-column prop="VisitName" min-width="120" :label="$t('trials:imageSummary:table:visit')" <el-table-column prop="VisitName" min-width="120" :label="$t('trials:imageSummary:table:imageType')"
show-overflow-tooltip sortable="custom" /> --> show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsHaveDicom" type="primary">{{
$fd('IsDicom', true)
}}</el-tag>
<el-tag v-if="scope.row.IsHaveNoneDicom" type="primary">{{
$fd('IsDicom', false)
}}</el-tag>
</template>
</el-table-column>
<!-- 影像数量 --> <!-- 影像数量 -->
<el-table-column prop="TotalImageCount" min-width="120" <el-table-column prop="TotalImageCount" min-width="120"
:label="$t('trials:imageSummary:table:TotalImageCount')" show-overflow-tooltip sortable="custom" /> :label="$t('trials:imageSummary:table:TotalImageCount')" show-overflow-tooltip sortable="custom" />
@ -158,6 +167,7 @@ export default {
console.log(err) console.log(err)
} }
}, },
//
handleExport() { }, handleExport() { },
// //
async handleExportImage(IsKeyImage = false) { async handleExportImage(IsKeyImage = false) {
@ -173,7 +183,7 @@ export default {
} }
let res = await getExportSubjectVisitImageList(data) let res = await getExportSubjectVisitImageList(data)
if (res.IsSuccess) { if (res.IsSuccess) {
this.downLoad(IsKeyImage, res.Result)
} }
} catch (err) { } catch (err) {
console.log(err) console.log(err)
@ -193,6 +203,64 @@ export default {
formatDownloadFile(IsKeyImage = false, row) { formatDownloadFile(IsKeyImage = false, row) {
let files = [], let files = [],
name = `${this.$route.query.researchProgramNo}.zip`; name = `${this.$route.query.researchProgramNo}.zip`;
if (!IsKeyImage) {
//ID/ID/访/Study ID_Study Date_Modality/
row.VisitList.forEach(visit => {
if (visit.StudyList && visit.StudyList.length > 0) {
visit.StudyList.forEach(study => {
if (study.SeriesList && study.SeriesList.length > 0) {
study.SeriesList.forEach(serie => {
if (serie.InstancePathList && serie.InstancePathList.length > 0) {
serie.InstancePathList.forEach(instance => {
let instanceArr = instance.Path.split("/")
let fileName = instanceArr[instanceArr.length - 1]
let obj = {
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${study.StudyCode}_${study.StudyTime}_${serie.Modality}/${fileName}`,
url: this.OSSclientConfig.basePath + instance.Path,
}
files.push(obj)
})
}
})
}
})
}
if (visit.NoneDicomStudyList && visit.NoneDicomStudyList.length > 0) {
visit.NoneDicomStudyList.forEach(noneDicomStudy => {
if (noneDicomStudy.FileList && noneDicomStudy.FileList.length > 0) {
noneDicomStudy.FileList.forEach(file => {
let obj = {
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${noneDicomStudy.StudyCode}_${noneDicomStudy.ImageDate}_${noneDicomStudy.Modality}/${file.FileName}`,
url: this.OSSclientConfig.basePath + file.Path,
}
files.push(obj)
})
}
})
}
})
} else {
//()/ID/ID/访/-/
row.forEach(item => {
['QuestionMarkPictureList', 'TableQuestionRowPictureList'].forEach(key => {
if (item[key] && item[key].length > 0) {
item[key].forEach(data => {
['PicturePath', 'otherPicturePath'].forEach(imgKey => {
if (data[imgKey]) {
let arr = data[imgKey].split("/")
let fileName = arr[arr.length - 1]
let obj = {
name: `${item.CriterionName}/${item.TrialSiteCode}/${item.SubjectCode}/${item.VisitName}/${this.$fd('ArmEnum', item.ArmEnum)}_${this.$fd('YesOrNo', item.IsJudgeSelect)}/${fileName}`,
url: this.OSSclientConfig.basePath + data[imgKey],
}
files.push(obj)
}
})
})
}
})
})
}
return { files, name } return { files, name }
}, },
@ -282,7 +350,7 @@ export default {
.size { .size {
display: inline-block; display: inline-block;
min-width: 50px; min-width: 100px;
} }
} }
} }

View File

@ -85,7 +85,7 @@
<el-table-column prop="IsDicom" min-width="130" :label="$t('trials:uploadMonitor:table:imageType')" <el-table-column prop="IsDicom" min-width="130" :label="$t('trials:uploadMonitor:table:imageType')"
show-overflow-tooltip sortable="custom"> show-overflow-tooltip sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('IsDicom', scope.row.IsDicom) }} <el-tag type="primary">{{ $fd('IsDicom', scope.row.IsDicom) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 上传人 --> <!-- 上传人 -->