@php
$questionsData = $this->questions;
$metaData = $this->meta;
$statisticsData = $this->statistics;
@endphp
{{-- 后台生成状态栏 - 仅在生成中显示 --}}
@if($isGenerating && $currentTaskId)
题目总数
{{ $statisticsData['total'] ?? 0 }}
基础难度 (≤0.4)
@php
$basicCount = 0;
foreach ($statisticsData['by_difficulty'] ?? [] as $key => $value) {
if ((float)$key <= 0.4) {
$basicCount += $value;
}
}
echo $basicCount;
@endphp
中等难度 (0.4-0.7)
@php
$mediumCount = 0;
foreach ($statisticsData['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 ($statisticsData['by_difficulty'] ?? [] as $key => $value) {
if ((float)$key > 0.7) {
$advancedCount += $value;
}
}
echo $advancedCount;
@endphp
统计数据调试:
{{ json_encode($statisticsData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
| 题目编号 |
知识点 |
题干 |
难度 |
操作 |
@forelse($questionsData as $question)
| {{ $question['question_code'] ?? 'N/A' }} |
{{ $question['kp_code'] ?? 'N/A' }} |
|
@php
$difficulty = $question['difficulty'] ?? null;
$label = match (true) {
!$difficulty => 'N/A',
(float)$difficulty <= 0.4 => '基础',
(float)$difficulty <= 0.7 => '中等',
default => '拔高',
};
@endphp
{{ $label }}
@if(app()->environment('local'))
({{ $difficulty }})
@endif
|
|
@empty
| 暂无数据 |
@endforelse
@if(!empty($metaData) && ($metaData['total'] ?? 0) > 0)
共 {{ $metaData['total'] ?? 0 }} 条记录
@foreach($this->getPages() as $page)
@endforeach
@endif