'use client'; import { calculateRIASECResults, riasecTypes, } from '../../test/private/RIASECCalculator'; interface RIASECResultProps { answers: string[]; } const descriptions = { R: '动手、设备、机械、户外与具体操作', I: '研究、分析、科学与复杂问题', A: '创作、设计、表达与开放式任务', S: '帮助、教学、照护与合作', E: '领导、说服、销售与组织资源', C: '数据、记录、流程与明确规范', }; function barWidth(average: number) { return `${Math.max(0, Math.min(100, ((average - 1) / 4) * 100))}%`; } export function RIASECResult({ answers }: RIASECResultProps) { const { scores, ranking, hollandCode } = calculateRIASECResults(answers); return (
你的 Holland Code
{hollandCode}

前三位依次代表当前最突出的职业兴趣方向。分数接近时,不必过度强调字母顺序。

{ranking.map(([code]) => { const result = scores[code] as { score: number; average: number }; const type = riasecTypes[code as keyof typeof riasecTypes]; return (

{code} · {type.name}

{descriptions[code as keyof typeof descriptions]}

{result.score}
/ 40
平均 {result.average.toFixed(2)} / 5
); })}
兴趣高分表示更可能享受这类活动,不代表已经具备相应能力。选择职业时还应结合技能、价值观、现实机会与工作环境。
); }