This commit is contained in:
gr
2026-10-15 11:03:54 +08:00
parent 70ddc1a70a
commit bb28d93cec
64 changed files with 12747 additions and 420 deletions
@@ -12,9 +12,21 @@
{{ assistantLogCellText(row, 'to') }}
</template>
</el-table-column>
<el-table-column label="继承" width="72" align="center">
<el-table-column label="继承" width="118" align="center">
<template #header>
<span>继承</span>
<el-tooltip
placement="top"
content="继承时第 k 诊:继承时刻之前患者已完成的诊次(有效实单数 + 偏移),复诊接诊率从第 k+1 诊起计入新医助分母;2026-10 前的继承记录无此快照"
>
<el-icon class="assign-log-col-hint"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<template #default="{ row }">
<el-tag v-if="Number(row.is_inherit) === 1" type="success" size="small">是</el-tag>
<template v-if="Number(row.is_inherit) === 1">
<el-tag type="success" size="small">是</el-tag>
<div v-if="inheritSlotText(row)" class="assign-log-inherit-slot">{{ inheritSlotText(row) }}</div>
</template>
<span v-else class="text-gray-400">否</span>
</template>
</el-table-column>
@@ -85,6 +97,20 @@ function relatedPoCreateTimeCell(row: Record<string, unknown>): string {
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`
}
/** 对应日志表 inherit_visit_slot / inherit_visit_slot_calc_time:后端已拼好「继承时第 k 诊」文案,缺失时按快照列兜底 */
function inheritSlotText(row: Record<string, unknown>): string {
const text = row.inherit_visit_slot_text
if (text != null && String(text).trim() !== '') {
return String(text)
}
const calcTime = Number(row.inherit_visit_slot_calc_time)
if (!Number.isFinite(calcTime) || calcTime <= 0) {
return ''
}
const k = Number(row.inherit_visit_slot)
return Number.isFinite(k) && k > 0 ? `继承时第 ${k} 诊` : '继承时未成交'
}
function assistantLogCellText(row: Record<string, unknown>, side: 'from' | 'to'): string {
const nameKey = side === 'from' ? 'from_assistant_name' : 'to_assistant_name'
const idKey = side === 'from' ? 'from_assistant_id' : 'to_assistant_id'
@@ -132,4 +158,11 @@ defineExpose({ refresh: load })
color: var(--el-text-color-secondary);
cursor: help;
}
.assign-log-inherit-slot {
margin-top: 2px;
font-size: 12px;
line-height: 1.3;
color: var(--el-text-color-secondary);
}
</style>