- <section class="lesson-history">
- <header class="page-header"><div><h1>{{embedded?'上课记录':'记录管理 · 上课记录'}}</h1><p>查询完整上课历史、查看课堂反馈与转交抗遗忘复习</p></div><button class="ui-button secondary" (click)="export()" [disabled]="exporting()||busy()">{{exporting()?'正在导出…':'导出 Excel'}}</button></header>
- <form class="lesson-filters" (ngSubmit)="query()">
- @if(!embedded){<label>学员姓名<input name="search" [(ngModel)]="search" placeholder="输入学员姓名"></label><label>会员 ID<input name="member" [(ngModel)]="memberId" inputmode="numeric" placeholder="精确查询"></label>}
- <label>授课老师<input name="coach" [(ngModel)]="coachName" placeholder="老师姓名"></label><label>门店<input name="store" [(ngModel)]="storeName" placeholder="门店名称"></label><label>课程<input name="course" [(ngModel)]="courseName" placeholder="课程名称"></label><app-operations-date-filter class="start-date-filter" label="开始日期" [value]="dateFrom" (valueChange)="dateFrom=$event" /><app-operations-date-filter label="结束日期" [value]="dateTo" (valueChange)="dateTo=$event" />
- <div class="filter-actions"><button type="submit" class="ui-button" [disabled]="busy()">查询</button><button type="button" class="ui-button secondary" [disabled]="busy()" (click)="reset()">重置</button></div></form>
- @if(error()){<p role="alert" class="notice error">{{error()}}</p>}@if(busy()){<p class="notice" role="status">正在查询上课记录…</p>}
- @if(data();as d){<div class="record-count"><strong>累计已上课 {{d.cumulativeTotal}} 节</strong><span>当前筛选 {{d.total}} 节 · 时间均为北京时间</span><label>每页<select [(ngModel)]="pageSize" (ngModelChange)="query()" [disabled]="busy()"><option [ngValue]="20">20 条</option><option [ngValue]="50">50 条</option><option [ngValue]="100">100 条</option></select></label>@if(studentId||memberId){<button class="ui-button secondary" [disabled]="busy()" (click)="showAll()">查看该学员全部结果</button>}</div>
- <section class="content-card"><div class="table-scroll"><table class="data-table lesson-table"><thead><tr><th>学员 / 课程</th><th>上课时间 ↓</th><th>授课老师 / 课型</th><th>反馈摘要</th><th>当前复习陪练</th><th>操作</th></tr></thead><tbody>
- @for(row of d.items;track row.lessonId){<tr><td><strong>{{row.studentName}}</strong><small>ID {{row.studentId}} · {{row.storeName}}</small><p>{{row.courseName}}</p></td><td class="time-cell">{{row.lessonAt | date:'yyyy-MM-dd HH:mm':'+0800'}}</td><td>{{row.coachName}}<small>{{row.classTypeLabel}}</small></td><td><p class="feedback-excerpt">{{row.feedbackSummary||'未记录'}}</p>@if(row.duplicateCount>1){<small class="exception">同课次有重复来源,已合并计数</small>}</td><td>{{row.reviewCoachLabel}}<small>待复习 {{row.pendingReviews}} 次</small></td><td><button class="ui-button secondary compact" (click)="detailId.set(row.lessonId)">查看反馈</button></td></tr>}
- @empty{<tr><td colspan="6"><div class="empty">没有符合条件的上课记录,可调整姓名或日期后查询。</div></td></tr>}
- </tbody></table></div></section>
- <div class="lesson-pagination"><span>已显示 {{d.items.length}} 条 / 共 {{d.total}} 条</span>@if(!all){<div><button class="ui-button secondary" [disabled]="busy()||page<=1" (click)="turn(-1)">上一页</button><span>第 {{page}} 页</span><button class="ui-button secondary" [disabled]="busy()||page*pageSize>=d.total" (click)="turn(1)">下一页</button></div>}</div>}
- @if(detailId()){<app-lesson-record-detail [lessonId]="detailId()" (closed)="detailId.set('')" (changed)="load()" />}
- </section>
|