@php $questionsData = $this->questions; $metaData = $this->meta; $statisticsData = $this->statistics; @endphp @php // 显示统计数据的标签 $statsLabel = $this->selectedKpCode ? "知识点 {$this->selectedKpCode}" : "全部题目"; $displayStats = $statisticsData; @endphp
题目总数
{{ $displayStats['total'] ?? 0 }}
简单题 (≤0.4)
@php $basicCount = 0; foreach ($displayStats['by_difficulty'] ?? [] as $key => $value) { if ((float)$key <= 0.4) { $basicCount += $value; } } echo $basicCount; @endphp
中等题 (0.4-0.7)
@php $mediumCount = 0; foreach ($displayStats['by_difficulty'] ?? [] as $key => $value) { if ((float)$key > 0.4 && (float)$key <= 0.7) { $mediumCount += $value; } } echo $mediumCount; @endphp
拔高题 (>0.7)
@php $advancedCount = 0; foreach ($displayStats['by_difficulty'] ?? [] as $key => $value) { if ((float)$key > 0.7) { $advancedCount += $value; } } echo $advancedCount; @endphp
选择题
@php $choiceCount = 0; foreach ($displayStats['by_type'] ?? [] as $type => $count) { if ($type === '选择题') { $choiceCount += $count; } } echo $choiceCount; @endphp
填空题
@php $fillCount = 0; foreach ($displayStats['by_type'] ?? [] as $type => $count) { if ($type === '填空题') { $fillCount += $count; } } echo $fillCount; @endphp
简单题
@php $simpleCount = 0; foreach ($displayStats['by_type'] ?? [] as $type => $count) { if (in_array($type, ['解答题', '其他'])) { $simpleCount += $count; } } echo $simpleCount; @endphp
@forelse($questionsData as $question) @empty @endforelse
题目编号 知识点 难度 技能点 题干 操作
{{ $question['question_code'] ?? 'N/A' }}
{{ $question['kp_name'] ?? $question['kp_code'] ?? 'N/A' }}
@if(!empty($question['kp_code']))
{{ $question['kp_code'] }}
@endif
@php $difficulty = $question['difficulty'] ?? null; $label = match (true) { !$difficulty => 'N/A', (float)$difficulty <= 0.4 => '基础', (float)$difficulty <= 0.7 => '中等', default => '拔高', }; @endphp {{ $label }} @php $skills = is_array($question['skills'] ?? null) ? $question['skills'] : json_decode($question['skills'] ?? '[]', true); $skillNames = []; if (!empty($skills)) { foreach ($skills as $skill) { $skill = trim($skill); // 处理格式如 {直线斜率,直线平行条件} 的情况 if (str_starts_with($skill, '{') && str_ends_with($skill, '}')) { $innerContent = substr($skill, 1, -1); $skillParts = explode(',', $innerContent); foreach ($skillParts as $part) { $part = trim($part); if (!empty($part)) { // 尝试从映射中获取名称 $skillName = $this->skillNameMapping[$part] ?? $part; if (!in_array($skillName, $skillNames)) { $skillNames[] = $skillName; } } } } else { // 处理单个技能点 $skillCode = preg_replace('/[{}]/', '', $skill); $skillName = $this->skillNameMapping[$skillCode] ?? $skillCode; if (!in_array($skillName, $skillNames)) { $skillNames[] = $skillName; } } } foreach (array_slice($skillNames, 0, 2) as $skillName) { echo '' . htmlspecialchars($skillName) . ''; } if (count($skillNames) > 2) { echo '...'; } } else { echo '-'; } @endphp @math($question['stem'] ?? 'N/A') @if(strlen($question['stem'] ?? '') > 150) @endif 查看
暂无数据
@if(!empty($metaData) && ($metaData['total'] ?? 0) > 0)
共 {{ $metaData['total'] ?? 0 }} 条记录
@foreach($this->getPages() as $page) @endforeach
@endif
{{-- 详情侧边栏 --}} @if($showDetailModal)

{{ $editing['question_code'] ?? '题目详情' }}

{{ $editing['kp_name'] ?? ($editing['kp_code'] ?? '') }} @if(!empty($editing['kp_code'])) ({{ $editing['kp_code'] }}) @endif

创建时间:{{ $editing['created_at'] ?? '-' }}
更新时间:{{ $editing['updated_at'] ?? '-' }}
@endif