{{-- 模式选择 --}}
{{-- 上传模式 --}} @if($mode === 'upload')

上传考试卷子

{{-- 左侧:选择老师和学生 --}}
{{-- 选择老师 --}}
{{-- 选择学生 --}}
{{-- 右侧:上传图片 --}}
@if($uploadedImage) {{-- 图片预览 --}}
预览
@else {{-- 上传区域 --}}
@endif
{{-- 提交按钮 --}}
@endif {{-- 选择试卷模式 --}} @if($mode === 'select_paper')

选择试卷并打分

{{-- 选择老师 --}}
{{-- 选择学生 --}}
{{-- 试卷类型 --}} @if(!empty($studentId))
{{-- 选择试卷 --}}
@endif {{-- 题目列表和评分 --}} @if(!empty($selectedPaperId) && count($this->selectedPaperQuestions) > 0)

题目列表

@foreach($this->selectedPaperQuestions as $question)
第 {{ $question['question_number'] }} 题 {{ $question['question_type'] }} ({{ $question['score'] }}分)
@math($question['content'])
参考答案: @math($question['answer'])
{{-- 评分区域 --}}
{{-- 学生答案 --}}
{{-- 对错判断(选择题/填空题) --}} @if(in_array($question['question_type'], ['选择题', '填空题']))
@endif {{-- 评分(计算题/简答题) --}} @if(in_array($question['question_type'], ['计算题', '简答题', '解答题']))
@endif
@endforeach
{{-- 提交按钮 --}}
@endif
@endif {{-- 最近上传记录 --}}

最近上传记录

@if(count($this->recentRecords) > 0)
@foreach($this->recentRecords as $record) @endforeach
学生 文件名 试卷形式 状态 进度 上传时间
{{ $record['student_name'] ?? '未知' }}
@if($record['type'] === 'ocr_upload') @elseif($record['type'] === 'graded_paper') @else @endif {{ $record['paper_name'] }}
@if($record['type'] === 'ocr_upload') @php $paperTypeLabel = match($record['paper_type']) { 'unit_test' => '单元测试', 'midterm' => '期中考试', 'final' => '期末考试', 'homework' => '家庭作业', 'quiz' => '随堂测验', 'other' => '其他', default => '未分类', }; @endphp {{ $paperTypeLabel }} @else {{ $record['paper_type'] }} @endif @php $statusClass = match($record['status']) { 'pending' => 'badge-ghost', 'processing' => 'badge-info', 'completed' => 'badge-success', 'failed' => 'badge-error', 'draft' => 'badge-warning', default => 'badge-ghost', }; $statusText = match($record['status']) { 'pending' => '待处理', 'processing' => '处理中', 'completed' => '已评分', 'failed' => '失败', 'draft' => '草稿', default => $record['status'], }; @endphp {{ $statusText }} @if($record['total_questions'] > 0) @if($record['type'] === 'ocr_upload' && isset($record['processed_questions'])) {{ $record['processed_questions'] }}/{{ $record['total_questions'] }} @else {{ $record['total_questions'] }} 题 @endif @else - @endif {{ $record['created_at'] }}
@else

暂无上传记录

@endif