{{-- 访问计算属性触发懒加载 --}} @php $questionsData = $this->questions; $metaData = $this->meta; $statisticsData = $this->statistics; @endphp
{{-- 头部操作按钮将在此处 --}}
{{-- 页面内容 --}}

题库管理

管理和浏览题库中的所有题目

{{-- 统计信息卡片 --}}
题目总数
{{ $statisticsData['total'] ?? 0 }}
基础难度
{{ $statisticsData['by_difficulty']['0.3'] ?? 0 }}
中等难度
{{ $statisticsData['by_difficulty']['0.6'] ?? 0 }}
拔高难度
{{ $statisticsData['by_difficulty']['0.85'] ?? 0 }}
{{-- 搜索和筛选 --}}
{{-- 题目列表 --}}
@forelse($questionsData as $question) @empty @endforelse
题目编号 知识点 题干 关联技能 难度 来源 操作
{{ $question['question_code'] ?? 'N/A' }} {{ $question['kp_code'] ?? 'N/A' }}
{{ \Illuminate\Support\Str::limit($question['stem'] ?? 'N/A', 80) }}
@php $skills = $question['skills'] ?? []; if (is_string($skills)) { $skills = json_decode($skills, true) ?? []; } $skillNames = []; foreach ($skills as $skill) { $skillNames[] = $skill['skill_name'] ?? ($skill['skill_code'] ?? 'N/A'); } $skillText = implode(', ', array_slice($skillNames, 0, 2)); if (count($skillNames) > 2) { $skillText .= ' ...'; } @endphp
@if(!empty($skillText)) {{ $skillText }} @else 无关联技能 @endif
@php $difficulty = $question['difficulty'] ?? null; $difficultyLabel = match (true) { !$difficulty => 'N/A', (float)$difficulty <= 0.4 => '基础', (float)$difficulty <= 0.7 => '中等', default => '拔高', }; $difficultyColor = match (true) { !$difficulty => 'gray', (float)$difficulty <= 0.4 => 'success', (float)$difficulty <= 0.7 => 'warning', default => 'danger', }; @endphp {{ $difficultyLabel }} @php $source = $question['source'] ?? ''; $sourceLabel = str_contains($source, 'ai::') ? 'AI 生成' : '手工录入'; $sourceColor = str_contains($source, 'ai::') ? 'blue' : 'gray'; @endphp {{ $sourceLabel }}
暂无题目数据

请尝试调整搜索条件或生成新题目

{{-- 分页信息 --}} @if(!empty($metaData) && ($metaData['total'] ?? 0) > 0)
显示第 {{ (($metaData['page'] ?? 1) - 1) * ($metaData['per_page'] ?? 25) + 1 }} 到 {{ min(($metaData['page'] ?? 1) * ($metaData['per_page'] ?? 25), $metaData['total'] ?? 0) }} 条, 共 {{ $metaData['total'] ?? 0 }} 条记录
@foreach($this->getPages() as $page) @endforeach
@endif
{{-- 加载指示器 --}}
加载中...