上传优化
continuous-integration/drone/push Build is passing Details

uat_us
熊飞 2024-01-18 18:03:26 +08:00
parent 1fde994bc9
commit 3955da8b56
2 changed files with 38 additions and 14 deletions

View File

@ -67,7 +67,7 @@
<el-button <el-button
v-if="!isConfirm && hasPermi(['trials:trials-panel:setting:qc-question:custom-question'])" v-if="!isConfirm && hasPermi(['trials:trials-panel:setting:qc-question:custom-question'])"
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-delete"
@click="handleBatchDelete" @click="handleBatchDelete"
> >
{{ $t('common:button:batchDelete') }} {{ $t('common:button:batchDelete') }}

View File

@ -265,9 +265,9 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!scope.row.dicomInfo.failedFileCount">{{$t('trials:uploadDicomList:table:status1')}}</span> <span v-if="!scope.row.dicomInfo.failedFileCount">{{$t('trials:uploadDicomList:table:status1')}}</span>
<span v-else-if="scope.row.dicomInfo.failedFileCount < scope.row.dicomInfo.fileCount && !scope.row.uploadState.record">{{$t('trials:uploadDicomList:table:status2')}}</span> <span style="color:#409eff" v-else-if="scope.row.dicomInfo.failedFileCount < scope.row.dicomInfo.fileCount && !scope.row.uploadState.record">{{$t('trials:uploadDicomList:table:status2')}}</span>
<span v-else-if="scope.row.dicomInfo.failedFileCount === scope.row.dicomInfo.fileCount">{{$t('trials:uploadDicomList:table:status3')}}</span> <span style="color:#2cc368" v-else-if="scope.row.dicomInfo.failedFileCount === scope.row.dicomInfo.fileCount">{{$t('trials:uploadDicomList:table:status3')}}</span>
<span v-else>{{ $t('trials:uploadDicomList:table:Failed') }}</span> <span style="color:#f66" v-else >{{ $t('trials:uploadDicomList:table:Failed') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -279,31 +279,37 @@
<el-tooltip placement="top" v-if="scope.row.uploadState.record"> <el-tooltip placement="top" v-if="scope.row.uploadState.record">
<div slot="content"> <div slot="content">
<div style="max-height: 500px;overflow-y: auto"> <div style="max-height: 500px;overflow-y: auto">
{{$t('trials:uploadDicomList:table:Existed')}} {{$t('trials:uploadDicomList:table:Existed')}}:
<div v-if="scope.row.uploadState.record.Existed.length"> <div v-if="scope.row.uploadState.record.Existed.length">
<span v-for="item of scope.row.uploadState.record.Existed">{{item}}</span> <div v-for="item of scope.row.uploadState.record.Existed" style="font-size: 12px;color:#baa72a">{{item}}</div>
</div> </div>
<div v-else> <div v-else>
&nbsp;
</div> </div>
{{$t('trials:uploadDicomList:table:Uploaded')}} {{$t('trials:uploadDicomList:table:Uploaded')}}:
<div v-if="scope.row.uploadState.record.Uploaded.length"> <div v-if="scope.row.uploadState.record.Uploaded.length">
<span v-for="item of scope.row.uploadState.record.Uploaded">{{item}}</span> <div v-for="item of scope.row.uploadState.record.Uploaded" style="font-size: 12px;color:#24b837">{{item}}</div>
</div> </div>
<div v-else> <div v-else>
&nbsp;
</div> </div>
<br> <br>
{{$t('trials:uploadDicomList:table:Failed')}} {{$t('trials:uploadDicomList:table:Failed')}}:
<div v-if="scope.row.uploadState.record.Failed.length"> <div v-if="scope.row.uploadState.record.Failed.length">
<span v-for="item of scope.row.uploadState.record.Failed">{{item}}</span> <div v-for="item of scope.row.uploadState.record.Failed" style="font-size: 12px;color:#f66">{{item}}</div>
</div> </div>
<div v-else> <div v-else>
&nbsp;
</div> </div>
</div> </div>
</div> </div>
<div style="cursor: pointer">{{ scope.row.uploadState.record.Existed.length }}/{{ scope.row.uploadState.record.Uploaded.length }}/{{ scope.row.uploadState.record.Failed.length }}</div> <el-button size="mini" style="cursor: pointer">
<span style="font-size: 12px;color:#baa72a">{{ scope.row.uploadState.record.Existed.length }}</span>
/
<span style="font-size: 12px;color:#24b837">{{ scope.row.uploadState.record.Uploaded.length }}</span>
/
<span style="font-size: 12px;color:#f66">{{ scope.row.uploadState.record.Failed.length }}</span>
</el-button>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
@ -1189,6 +1195,24 @@ export default {
let logJsonBlob = scope.generateTxtFile(text) let logJsonBlob = scope.generateTxtFile(text)
let logJsonObjectName = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt` 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 = await scope.OSSclient.put(logJsonObjectName, logJsonBlob)
for (let i = 0; i < seriesList.length; i++) {
let v = seriesList[i]
let o = params.study.seriesList.find(o => {
return o.seriesInstanceUid === v.seriesUid
})
if (o && !o.ImageResizePath) {
let fileId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
v.instanceList[0].file
)
let blob = await scope.dicomToPng(fileId, v.instanceList[0].imageColumns, v.instanceList[0].imageRows)
let thumbnailPath = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}/${v.seriesUid}.png`
let OSSclient = scope.OSSclient
let seriesRes = await OSSclient.put(thumbnailPath, blob)
if (seriesRes && seriesRes.url) {
o.ImageResizePath = scope.$getObjectName(seriesRes.url)
}
}
}
if (logRes && logRes.url) { if (logRes && logRes.url) {
params.study.instanceCount = dicomInfo.failedFileCount params.study.instanceCount = dicomInfo.failedFileCount
params.RecordPath = scope.$getObjectName(logRes.url) params.RecordPath = scope.$getObjectName(logRes.url)