Commit 5abea1b8 by luoqi

fix(web): 召回池卡片去掉优先级那排五个色点,只留分数

业务 2026-07-30。分数本身已经带档位信息(而且还按档着色),五个点是同一件事的
第二种编码 —— 一行里两处讲优先级,反而要人对照着看。

档位色保留在数字上(极低/低 绿 → 中/高 琥珀 → 极高 玫红),扫一眼仍分得出轻重;
算分明细仍走外层 PriorityHover,没动。

️ 只改左栏列表卡片。详情页顶栏那个「优先级 ●●○○○ 低」是 shared.tsx 的 PriorityBar
(带文字档位标签),不是同一个组件,业务没要求动。

本地实测:卡片只剩 3.12 / 2.74,色点已无;web typecheck 通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
parent 2b179c7c
...@@ -658,23 +658,23 @@ function DoctorPicker({ ...@@ -658,23 +658,23 @@ function DoctorPicker({
); );
} }
// ── 优先级(与列表页 PriorityBar 同款:五格条 + 10 分制)──────── // ── 优先级(只留分数,10 分制)────────────────────────────────
// 业务 2026-07-30:去掉原来那排五个色点。分数本身已经带档位信息(还按档着色),
// 五个点是同一件事的第二种编码 —— 一行里两处讲优先级,反而要人对照着看。
// 档位色保留在数字上:极低/低 绿 → 中/高 琥珀 → 极高 玫红,扫一眼仍分得出轻重。
// hover 的算分明细走外层 PriorityHover,不在这里。
function PriorityBar({ score }: { score: number }) { function PriorityBar({ score }: { score: number }) {
const pct = Math.max(0, Math.min(1, score / 100)); const pct = Math.max(0, Math.min(1, score / 100));
const filled = Math.max(1, Math.round(pct * 5));
const colors = ['bg-emerald-400', 'bg-emerald-500', 'bg-amber-400', 'bg-amber-500', 'bg-rose-500'];
const labelTone = const labelTone =
pct >= 0.6 ? (pct >= 0.8 ? 'text-rose-700' : 'text-amber-700') : pct >= 0.2 ? 'text-emerald-700' : 'text-slate-500'; pct >= 0.6 ? (pct >= 0.8 ? 'text-rose-700' : 'text-amber-700') : pct >= 0.2 ? 'text-emerald-700' : 'text-slate-500';
// 同列表页:展示值 = 排序键 / 10,别再读 breakdown.raw(见 plans-list-app 注释) // 同列表页:展示值 = 排序键 / 10,别再读 breakdown.raw(见 plans-list-app 注释)
const disp = (score / 10).toFixed(2); const disp = (score / 10).toFixed(2);
return ( return (
<span className="inline-flex flex-none items-center gap-1" title={`优先级 ${disp} / 10`}> <span
<span className="inline-flex items-center gap-0.5"> className={cn('flex-none text-[10.5px] font-semibold tabular-nums', labelTone)}
{Array.from({ length: 5 }).map((_, i) => ( title={`优先级 ${disp} / 10`}
<span key={i} className={cn('h-1.5 w-[6px] rounded-sm', i < filled ? colors[i] : 'bg-slate-200')} /> >
))} {disp}
</span>
<span className={cn('text-[10.5px] font-semibold tabular-nums', labelTone)}>{disp}</span>
</span> </span>
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment