feat: 在推理结果中添加完成时间字段
- 后端 API 返回数据增加 `completed_at` 字段 - 前端管理界面新增“推理时间”列并格式化显示
This commit is contained in:
1 parent
7c6b54b516
commit
bd61ea87c9
2 files changed
+7
-1
No files matched your search
@@ -1117,7 +1117,8 @@ def get_inference_results():
|
||||
results.append({
|
||||
'task_uuid': task.task_uuid,
|
||||
'created_at': task.created_at.isoformat() if task.created_at else None,
|
||||
'patient_id': patient_id, # 添加患者 ID
|
||||
'completed_at': task.completed_at.isoformat() if task.completed_at else None,
|
||||
'patient_id': patient_id,
|
||||
'predicted_class': patient_result.predicted_class,
|
||||
'confidence': patient_result.confidence,
|
||||
'prob_means': patient_result.prob_means,
|
||||
|
||||
@@ -306,6 +306,11 @@
|
||||
<el-dialog v-model="resultsVisible" :title="$t('admin.inferenceResults')" width="1000px">
|
||||
<el-table :data="inferenceResults" style="width: 100%" max-height="500">
|
||||
<el-table-column prop="patient_id" :label="$t('common.patientId')" width="150" />
|
||||
<el-table-column prop="completed_at" label="推理时间" width="180">
|
||||
<template #default="scope">
|
||||
{{ formatTime(scope.row.completed_at) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="predicted_class" :label="$t('admin.predictedClass')" width="120">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.predicted_class > 0 ? 'danger' : 'success'">
|
||||
|
||||
Reference in new issue
Block a user