|
|
@@ -401,7 +401,14 @@ const detail = computed(() => {
|
|
|
if (isRest && !d.actualIn && !d.actualOut && !augmentedList.includes('REST')) {
|
|
|
augmentedList.push('REST')
|
|
|
}
|
|
|
- const statusLabel = augmentedList.length > 0 ? translateStatus(augmentedList) : ''
|
|
|
+ // 详情卡的 statusLabel 只能展示一个名称,否则会出现"正常 / 迟到"这种自相矛盾的标签。
|
|
|
+ // 优先级:异常 (LATE/EARLY/ABSENT) > 请假 > 休息 > 正常
|
|
|
+ const STATUS_PRIORITY = ["LATE", "EARLY", "ABSENT", "LEAVE", "REST", "NORMAL"]
|
|
|
+ let picked = null
|
|
|
+ for (const s of STATUS_PRIORITY) {
|
|
|
+ if (augmentedList.includes(s)) { picked = s; break }
|
|
|
+ }
|
|
|
+ const statusLabel = picked ? translateStatus(picked) : ''
|
|
|
return { shiftText, inText, outText, inLabel, outLabel, workText, statusLabel, actualOut: d.actualOut };
|
|
|
});
|
|
|
|