@push('styles') @endpush

上传试卷进行OCR识别

支持JPG、PNG格式图片

{{-- 选择老师和学生 --}}
{{-- 选择老师 --}}
{{-- 选择学生 --}}
{{-- 选择试卷 --}} @if(!empty($studentId))
@endif {{-- 显示选中的试卷题目 --}} @if(!empty($selectedPaperId) && count($this->selectedPaperQuestions) > 0)

选中的试卷题目(共{{ count($this->selectedPaperQuestions) }}题)

@foreach($this->selectedPaperQuestions as $index => $question)
第{{ $question['question_number'] ?? ($index + 1) }}题: {{ Str::limit(strip_tags($question['content'] ?? $question['stem'] ?? ''), 80) }}
@endforeach
@endif {{-- 图片上传组件 --}} @if(!empty($selectedPaperId)) @livewire(\App\Livewire\UploadExam\UploadForm::class, [ 'teacherId' => $teacherId, 'studentId' => $studentId, 'selectedPaperId' => $selectedPaperId ], key('upload-form-' . $selectedPaperId)) @endif
@if($selectedRecord)

处理进度

{{ $selectedRecord->paper_title }}

上传
OCR识别
AI判分
状态: @switch($selectedRecord->status) @case('pending') 待处理 @break @case('processing') 处理中 @break @case('completed') 已完成 @break @case('failed') 失败 @break @default 未知 @endswitch
@if($selectedRecord->status === 'completed' && $selectedRecord->questions->count() > 0)

识别结果预览

@foreach($selectedRecord->questions->take(5) as $question)
第{{ $question->question_number }}题 {{ $question->question_type }}
答案: {{ $question->student_answer }}
@endforeach @if($selectedRecord->questions->count() > 5)

...还有 {{ $selectedRecord->questions->count() - 5 }} 道题

@endif
@endif @if($selectedRecord->status === 'failed')

{{ $selectedRecord->error_message ?? '处理失败,请重试' }}

@endif
@endif

最近处理记录

@foreach($this->getRecentRecords() as $record) @endforeach
试卷标题 学生ID 题数 状态 提交时间 操作
{{ $record->paper_title }} {{ $record->user_id }} {{ $record->questions->count() }} @switch($record->status) @case('pending') 待处理 @break @case('processing') 处理中 @break @case('completed') 已完成 @break @case('failed') 失败 @break @default 未知 @endswitch {{ $record->created_at->diffForHumans() }}