import { SUBJECT_FILTER_OPTIONS } from '@/utils/subject'; export interface ParentChild { id: string; name: string; account: string; school: string; className: string; examNo: string; } export interface SubjectTrend { subject: string; status?: 'up' | 'down' | 'stable' | 'none'; trendName?: string; } export interface GradeBand { label: string; level: 'excellent' | 'good' | 'middle' | 'weak'; subjects: SubjectTrend[]; } export interface ReportItem { id: string; subject: string; category: string; title: string; score: number; date: string; grade: string; } export interface ReportScoreBlock { label: string; value: string; desc: string; } export interface ReportRank { label: string; value: string; } export interface ReportAnalysisRow { range: string; type: string; score: string; rate: string; } export interface ReportDifficultyRow { difficulty: string; range: string; score: string; rate: string; } /** 答题卡列表用的轻量字段(不含 HTML) */ export type ReportQuestionSummary = Pick< ReportQuestion, 'no' | 'type' | 'score' | 'status' | 'classRate' | 'schoolRate' | 'knowledge' >; export interface ReportQuestion { no: number; type: string; score: string; status: 'correct' | 'wrong' | 'unanswered'; /** 供 rich-text 渲染的题干 HTML */ stemHtml: string; /** 题干中的图片(与学生端一致,从 HTML 中拆出单独展示) */ stemImages: string[]; /** 供 rich-text 渲染的正确答案 HTML */ correctAnswerHtml: string; /** 纯文本学员答案(选择题等) */ studentAnswer: string; /** 供 rich-text 渲染的学员答案 HTML(富文本作答) */ studentAnswerHtml: string; /** 学员上传的图片答案 */ studentAnswerImages: string[]; classRate: string; schoolRate: string; knowledge: string; } export interface ReportKnowledgeRatio { name: string; percent: number; tone: 'blue' | 'orange' | 'green'; } export interface ReportKnowledgeScore { name: string; fullScore: number; score: number; } export interface ReportDetail { id: string; scoreBlocks: ReportScoreBlock[]; ranks: ReportRank[]; analysisRows: ReportAnalysisRow[]; difficultyRows: ReportDifficultyRow[]; questions: ReportQuestion[]; knowledgeRatios: ReportKnowledgeRatio[]; knowledgeScores: ReportKnowledgeScore[]; } export interface QuickAction { title: string; desc: string; tone: 'cyan' | 'green' | 'orange'; } export interface KnowledgeWeakPoint { name: string; subject: string; grade: string; category: string; fullScore: number; score: number; wrongPercent: number; tone: 'blue' | 'orange' | 'green' | 'rose'; } export interface AbilityTrendPoint { date: string; score: number; } export interface AbilitySummary { label: string; value: string; desc: string; } // 家长端首版先用结构化本地数据承载页面功能,后续接接口只需要替换这里的来源。 export const parentChildren: ParentChild[] = [ { id: 'child-1', name: '小星河', account: '3620012788', school: '山东蓝翔技校(初中)', className: '初2027级3班', examNo: '3620012788', }, { id: 'child-2', name: '小灵犀', account: '3620012563', school: '山东蓝翔技校(初中)', className: '初2027级3班', examNo: '3620012563', }, ]; export const gradeBands: GradeBand[] = [ { label: '优势保持', level: 'excellent', subjects: [], }, { label: '良好巩固', level: 'good', subjects: [{ subject: '数学', status: 'down' }], }, { label: '重点提升', level: 'middle', subjects: [ { subject: '语文', status: 'up' }, { subject: '英语', status: 'up' }, ], }, { label: '及时补弱', level: 'weak', subjects: [], }, ]; export const quickActions: QuickAction[] = [ { title: '学情追踪', desc: '查看本周学习变化', tone: 'cyan' }, { title: '错题练习', desc: '按薄弱点再练一遍', tone: 'orange' }, { title: '课程学习', desc: '进入课程任务', tone: 'green' }, ]; export const reportList: ReportItem[] = [ { id: 'r1', subject: '数学', category: '周作业', title: '2023-2024学年(上)初2023级七年级上期末模拟(五)数学', score: 100, date: '2024-01-12', grade: '初一', }, { id: 'r2', subject: '多科', category: '月考', title: '2023-2024学年(上)初2023级阶段性练习', score: 60, date: '2024-01-08', grade: '初一', }, { id: 'r3', subject: '语文', category: '周作业', title: '2023-2024学年(上)初2023级七年级上期末模拟(三)语文', score: 92, date: '2023-12-28', grade: '初一', }, { id: 'r4', subject: '英语', category: '周作业', title: '2023-2024学年(上)初2023级七年级上期末模拟(三)英语', score: 88.5, date: '2023-12-28', grade: '初一', }, ]; export const reportDetails: Record = { r1: { id: 'r1', scoreBlocks: [ { label: '我的得分', value: '120', desc: '总分 120' }, { label: '满分', value: '120', desc: '本次卷面' }, { label: '得分率', value: '100.0%', desc: '超过多数同学' }, ], ranks: [ { label: '班级排名', value: '1/45' }, { label: '年级排名', value: '6/680' }, ], analysisRows: [ { range: '1-10', type: '选择题', score: '40/40', rate: '100%' }, { range: '11-16', type: '填空题', score: '30/30', rate: '100%' }, { range: '17-21', type: '解答题', score: '20/20', rate: '100%' }, { range: '22-23', type: '压轴题', score: '5/10', rate: '50%' }, ], difficultyRows: [ { difficulty: '简单题', range: '1-8', score: '32/32', rate: '100%' }, { difficulty: '中等题', range: '9-18', score: '42/44', rate: '95.5%' }, { difficulty: '难题', range: '19-23', score: '18/24', rate: '75.0%' }, ], questions: [ { no: 1, type: '选择题', score: '4/4', status: 'correct', stem: '请结合材料完成本题要求。', correctAnswer: 'A', studentAnswer: 'A', classRate: '88%', schoolRate: '84%', knowledge: '字音字形' }, { no: 2, type: '选择题', score: '4/4', status: 'correct', stem: '根据题意选择最符合要求的一项。', correctAnswer: 'C', studentAnswer: 'C', classRate: '84%', schoolRate: '81%', knowledge: '词语运用' }, { no: 3, type: '选择题', score: '4/4', status: 'correct', stem: '阅读材料并判断关键条件。', correctAnswer: 'B', studentAnswer: 'B', classRate: '80%', schoolRate: '78%', knowledge: '病句辨析' }, { no: 4, type: '选择题', score: '4/4', status: 'correct', stem: '从选项中选出表达准确的一项。', correctAnswer: 'D', studentAnswer: 'D', classRate: '76%', schoolRate: '75%', knowledge: '文学常识' }, { no: 5, type: '选择题', score: '4/4', status: 'correct', stem: '根据语境判断标点使用。', correctAnswer: 'A', studentAnswer: 'A', classRate: '72%', schoolRate: '72%', knowledge: '标点符号' }, { no: 6, type: '选择题', score: '4/4', status: 'correct', stem: '判断句子修辞手法。', correctAnswer: 'B', studentAnswer: 'B', classRate: '88%', schoolRate: '69%', knowledge: '修辞手法' }, { no: 7, type: '选择题', score: '4/4', status: 'correct', stem: '结合古诗文选择正确理解。', correctAnswer: 'C', studentAnswer: 'C', classRate: '84%', schoolRate: '84%', knowledge: '古诗文默写' }, { no: 8, type: '选择题', score: '4/4', status: 'correct', stem: '阅读片段后概括中心信息。', correctAnswer: 'D', studentAnswer: 'D', classRate: '80%', schoolRate: '81%', knowledge: '名著阅读' }, { no: 9, type: '选择题', score: '4/4', status: 'correct', stem: '判断句间衔接是否连贯。', correctAnswer: 'A', studentAnswer: 'A', classRate: '76%', schoolRate: '78%', knowledge: '语段衔接' }, { no: 10, type: '选择题', score: '4/4', status: 'correct', stem: '完成句式转换。', correctAnswer: 'C', studentAnswer: 'C', classRate: '72%', schoolRate: '75%', knowledge: '句式转换' }, { no: 11, type: '填空题', score: '5/5', status: 'correct', stem: '补全古文实词解释。', correctAnswer: '明察', studentAnswer: '明察', classRate: '88%', schoolRate: '72%', knowledge: '古文实词' }, { no: 12, type: '填空题', score: '5/5', status: 'correct', stem: '补全古文虚词用法。', correctAnswer: '之', studentAnswer: '之', classRate: '84%', schoolRate: '69%', knowledge: '古文虚词' }, { no: 13, type: '填空题', score: '5/5', status: 'correct', stem: '判断文言断句位置。', correctAnswer: 'B', studentAnswer: 'B', classRate: '80%', schoolRate: '84%', knowledge: '文言断句' }, { no: 14, type: '填空题', score: '5/5', status: 'correct', stem: '翻译关键句子。', correctAnswer: '符合语境', studentAnswer: '符合语境', classRate: '76%', schoolRate: '81%', knowledge: '翻译理解' }, { no: 15, type: '填空题', score: '5/5', status: 'correct', stem: '赏析诗句表达效果。', correctAnswer: '借景抒情', studentAnswer: '借景抒情', classRate: '72%', schoolRate: '78%', knowledge: '诗歌鉴赏' }, { no: 16, type: '填空题', score: '5/5', status: 'correct', stem: '概括现代文段落作用。', correctAnswer: '承上启下', studentAnswer: '承上启下', classRate: '68%', schoolRate: '74%', knowledge: '段落作用' }, { no: 17, type: '解答题', score: '4/4', status: 'correct', stem: '结合文本分析人物形象。', correctAnswer: '要点完整', studentAnswer: '要点完整', classRate: '81%', schoolRate: '77%', knowledge: '人物形象' }, { no: 18, type: '解答题', score: '4/4', status: 'correct', stem: '解释标题的含义。', correctAnswer: '双层含义', studentAnswer: '双层含义', classRate: '79%', schoolRate: '73%', knowledge: '标题含义' }, { no: 19, type: '解答题', score: '4/4', status: 'correct', stem: '分析语句表达效果。', correctAnswer: '修辞与情感', studentAnswer: '修辞与情感', classRate: '73%', schoolRate: '70%', knowledge: '语句赏析' }, { no: 20, type: '解答题', score: '4/4', status: 'correct', stem: '根据材料提出观点。', correctAnswer: '观点明确', studentAnswer: '观点明确', classRate: '70%', schoolRate: '68%', knowledge: '观点表达' }, { no: 21, type: '解答题', score: '4/4', status: 'correct', stem: '完成综合探究。', correctAnswer: '材料充分', studentAnswer: '材料充分', classRate: '66%', schoolRate: '63%', knowledge: '综合探究' }, { no: 22, type: '压轴题', score: '2/5', status: 'wrong', stem: '结合整篇文章完成开放表达。', correctAnswer: '围绕主题并联系生活', studentAnswer: '联系不足', classRate: '52%', schoolRate: '49%', knowledge: '开放表达' }, { no: 23, type: '压轴题', score: '3/5', status: 'wrong', stem: '完成写作片段升格。', correctAnswer: '结构完整、语言有层次', studentAnswer: '结构较散', classRate: '48%', schoolRate: '44%', knowledge: '写作表达' }, ], knowledgeRatios: [ { name: '函数与图像', percent: 40, tone: 'blue' }, { name: '几何证明', percent: 35, tone: 'orange' }, { name: '方程应用', percent: 25, tone: 'green' }, ], knowledgeScores: [ { name: '《西游记》', fullScore: 2, score: 0 }, { name: '情感主旨', fullScore: 2, score: 0 }, { name: '环境描写', fullScore: 4, score: 1.5 }, { name: '开放表达', fullScore: 5, score: 2 }, { name: '写作表达', fullScore: 5, score: 3 }, ], }, }; export const subjectOptions = SUBJECT_FILTER_OPTIONS.map((item) => item.label); export const gradeOptions = ['全部年级', '初一', '初二', '初三']; export const categoryOptions = ['全部类型', '周作业', '月考']; export const knowledgeWeakPoints: KnowledgeWeakPoint[] = [ { name: '函数与图像', subject: '数学', grade: '初一', category: '周作业', fullScore: 20, score: 8, wrongPercent: 40, tone: 'blue', }, { name: '几何证明', subject: '数学', grade: '初一', category: '周作业', fullScore: 20, score: 9, wrongPercent: 45, tone: 'orange', }, { name: '方程应用', subject: '数学', grade: '初一', category: '月考', fullScore: 20, score: 15, wrongPercent: 25, tone: 'green', }, { name: '现代文阅读', subject: '语文', grade: '初一', category: '周作业', fullScore: 16, score: 10, wrongPercent: 38, tone: 'rose', }, { name: '完形填空', subject: '英语', grade: '初一', category: '月考', fullScore: 15, score: 11, wrongPercent: 27, tone: 'blue', }, ]; export const abilityTrend: AbilityTrendPoint[] = [ { date: '11-22', score: 62 }, { date: '11-28', score: 68 }, { date: '12-05', score: 72 }, { date: '12-13', score: 91 }, { date: '12-20', score: 75 }, { date: '12-27', score: 78 }, { date: '01-03', score: 81 }, { date: '01-08', score: 76 }, { date: '01-14', score: 79 }, ]; export const abilitySummary: AbilitySummary[] = [ { label: '得分能力综合评估', value: '良好', desc: '最近一次峰值明显,整体维持在良好区间。', }, { label: '得分能力稳定性', value: '相对波动', desc: '12月中旬后回落,需要关注高分后的复盘质量。', }, ];