feat: 组织架构 M 级人名用金色

This commit is contained in:
chenpei 2026-08-19 22:26:26 +08:00
parent 2a2c713d83
commit 466ab61278

View File

@ -81,6 +81,11 @@ const LEVEL_TYPE_LABEL: Record<string, string> = {
S: '支持',
}
function isManagementLevel(employee: EmployeeRow) {
if (employee.levelType === 'M') return true
return /^M\d+/i.test(employee.positionLevel || '')
}
const STATE_LABEL: Record<string, string> = {
ACTIVE: '在职',
RESIGNED: '离职',
@ -500,10 +505,20 @@ export default function OrganizationWorkspace({ embedded = false }: Organization
<tr key={e.userId} className="border-b border-[#eef0f3] hover:bg-[#f4f5f7]">
<td className="px-5 py-3">
<div className="flex items-center gap-2.5">
<span className="w-7 h-7 rounded-full bg-[#eef0fa] text-[#1a1c1d] text-[12px] font-semibold flex items-center justify-center">
<span
className={`w-7 h-7 rounded-full text-[12px] font-semibold flex items-center justify-center ${
isManagementLevel(e)
? 'bg-[#fdf6e9] text-[#8a6114]'
: 'bg-[#eef0fa] text-[#1a1c1d]'
}`}
>
{(e.displayName ?? e.realName ?? '?').slice(0, 1)}
</span>
<span className="text-[13px] text-[#1a1c1d] font-medium">
<span
className={`text-[13px] font-medium ${
isManagementLevel(e) ? 'text-[#8a6114]' : 'text-[#1a1c1d]'
}`}
>
{e.displayName ?? e.realName ?? e.username}
</span>
{e.isLeadership && (