@php $mineruBlocks = $mineru['blocks'] ?? []; $builderQuestions = $builder['questions'] ?? []; @endphp
{{ $this->form }} @if($message)
{{ $message }}
@endif

整页预览 (page {{ $page }})

@if(!empty($paths))
builder: {{ $paths['builder_page'] ?? '' }}
@endif
点击页码自动加载
@if(!empty($pagePngBase64)) @php $width = $mineru['width'] ?? 0; $height = $mineru['height'] ?? 0; $targetHeight = 820; $scale = ($height > 0) ? ($targetHeight / $height) : 0.28; $showWidth = $width ? $width * $scale : 520; $showHeight = $targetHeight; @endphp
@if($showOverlay) @foreach($mineruBlocks as $b) @php $bbox = $b['bbox'] ?? [0,0,0,0]; $x = $bbox[0] * $scale; $y = $bbox[1] * $scale; $w = ($bbox[2]-$bbox[0]) * $scale; $h = ($bbox[3]-$bbox[1]) * $scale; if ($w < 4 && $h < 4) continue; $color = 'rgba(59,130,246,0.25)'; $type = strtolower($b['type'] ?? 'text'); if($type === 'figure') $color = 'rgba(16,185,129,0.25)'; if($type === 'table') $color = 'rgba(234,179,8,0.25)'; if($type === 'formula') $color = 'rgba(239,68,68,0.25)'; @endphp
@endforeach @endif
@else
无页面图片
@endif

生成题目({{ count($builderQuestions) }})

@foreach($builderQuestions as $idx => $q)
Q{{ $q['index'] ?? ($idx+1) }} ({{ $q['type'] ?? '' }})
@if(!empty($q['qa_flags'])) QA: {{ implode(',', $q['qa_flags']) }} @endif 加入草稿
{{ $q['stem'] ?? '' }}
@if(!empty($q['options']))
@foreach($q['options'] as $k=>$v)
{{ $k }}. {{ $v }}
@endforeach
@endif @if(!empty($q['images']))
@foreach($q['images'] as $img)
{{ $img['path'] ?? 'img' }}
@endforeach
@endif
raw_blocks: {{ isset($q['raw_blocks']) ? json_encode($q['raw_blocks']) : '' }}
@endforeach
@if($mineruBlocks)
MinerU Blocks({{ count($mineruBlocks) }})点击展开
@foreach($mineruBlocks as $b)
{{ $b['type'] ?? 'text' }} / cat: {{ $b['category_id'] ?? '' }}
bbox: {{ json_encode($b['bbox'] ?? []) }}
text: {{ $b['text'] ?? ($b['content'] ?? '') }}
@endforeach
@endif @if($builder)

整页题目 JSON(编辑后可“保存到草稿”)

@endif