knowledge-point-question-stats.blade.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <x-filament::page>
  2. <div class="space-y-6">
  3. <x-filament::section
  4. heading="说明"
  5. description="排序:各年级下学期教材(textbooks.semester={{ \App\Services\KnowledgePointQuestionStatsService::textbookSemesterForOrdering() }})章节关联知识点顺序优先,其次 questions 题量升序。tem 列为 questions_tem 中不与正式库同题干重复的数量。"
  6. :compact="true"
  7. />
  8. <x-filament::section heading="数据表" :compact="true">
  9. <div class="overflow-x-auto rounded-lg border border-gray-200 dark:border-white/10">
  10. <table class="w-full text-left text-sm">
  11. <thead class="bg-gray-50 dark:bg-white/5">
  12. <tr>
  13. <th class="px-3 py-2 font-medium">知识点 ID</th>
  14. <th class="px-3 py-2 font-medium">知识点名称</th>
  15. <th class="px-3 py-2 font-medium text-right">questions</th>
  16. <th class="px-3 py-2 font-medium text-right">questions_tem(不重复)</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. @forelse ($this->statRows as $r)
  21. <tr class="border-t border-gray-100 dark:border-white/10" wire:key="kp-stat-{{ $r['kp_code'] }}">
  22. <td class="px-3 py-2 font-mono text-xs">{{ $r['kp_code'] }}</td>
  23. <td class="px-3 py-2">{{ $r['kp_name'] !== '' ? $r['kp_name'] : '—' }}</td>
  24. <td class="px-3 py-2 text-right tabular-nums">{{ $r['questions_count'] }}</td>
  25. <td class="px-3 py-2 text-right tabular-nums">{{ $r['tem_non_duplicate_count'] }}</td>
  26. </tr>
  27. @empty
  28. <tr>
  29. <td colspan="4" class="px-3 py-6 text-center text-gray-500">暂无数据(需 questions 或 questions_tem 中有题目)</td>
  30. </tr>
  31. @endforelse
  32. </tbody>
  33. </table>
  34. </div>
  35. </x-filament::section>
  36. <x-filament::section
  37. heading="Markdown 全文(直接输出)"
  38. description="与命令 php artisan stats:kp-questions-md 一致;点击区域可全选复制"
  39. :compact="true"
  40. >
  41. <pre
  42. class="fi-input max-h-[min(70vh,48rem)] cursor-text overflow-auto whitespace-pre-wrap break-words rounded-lg border border-gray-200 bg-gray-50 p-4 font-mono text-xs leading-relaxed text-gray-900 dark:border-white/10 dark:bg-white/5 dark:text-gray-100"
  43. tabindex="0"
  44. onclick="const s=window.getSelection(),r=document.createRange();r.selectNodeContents(this);s.removeAllRanges();s.addRange(r);"
  45. >{{ $this->markdownExport }}</pre>
  46. </x-filament::section>
  47. </div>
  48. </x-filament::page>