| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- @php
- // 复用题目数据并开启判卷模式(显示方框+答案+思路)
- $grading = true;
- @endphp
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <title>{{ $paper->paper_name ?? '判卷预览' }}</title>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
- <style>
- @page { size: A4; margin: 2cm; }
- :root {
- --question-gap: 6px;
- }
- body {
- font-family: "SimSun", "Songti SC", serif;
- line-height: 1.65;
- color: #000;
- background: #fff;
- font-size: 14px;
- }
- .page {
- max-width: 720px;
- margin: 0 auto;
- padding: 0 12px;
- }
- .header { text-align: center; margin-bottom: 1.5rem; border-bottom: 2px solid #000; padding-bottom: 1rem; }
- .section-title { font-size: 16px; font-weight: bold; margin-top: 16px; margin-bottom: 10px; }
- .question { margin-bottom: 14px; page-break-inside: avoid; }
- .question-grid {
- display: grid;
- grid-template-columns: auto 1fr;
- column-gap: 4px;
- row-gap: 6px;
- align-items: flex-start;
- }
- .question-lead {
- display: flex;
- gap: 4px;
- align-items: flex-start;
- font-weight: 600;
- font-size: 14px;
- line-height: 1.6;
- margin-top: 2px;
- }
- .question-lead.spacer { visibility: hidden; }
- .question-number { white-space: nowrap; margin-right: 2px; }
- .grading-boxes { gap: 4px; flex-wrap: wrap; align-items: center; }
- .grading-boxes span { vertical-align: middle; }
- .question-main { font-size: 14px; line-height: 1.65; font-family: inherit; display: block; }
- .question-score { margin-right: 6px; font-weight: 600; }
- .question-stem { display: inline-block; font-size: 14px; font-family: inherit; }
- .options { display: grid; row-gap: 8px; margin-top: 8px; }
- .options-grid-2 {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 8px 20px;
- }
- .option { display: flex; align-items: flex-start; font-size: 14px; line-height: 1.6; }
- .option strong { margin-right: 4px; }
- .option-compact { font-size: 14px; line-height: 1.6; }
- .answer-area { position: relative; margin-top: 4px; }
- .answer-area.boxy {
- min-height: 150px;
- border: 1.5px solid #444;
- border-radius: 6px;
- padding: 14px;
- }
- .answer-label {
- position: absolute;
- top: -10px;
- left: 10px;
- font-size: 10px;
- background: #fff;
- padding: 0 4px;
- color: #555;
- letter-spacing: 1px;
- }
- .answer-meta {
- font-size: 12px;
- color: #2f2f2f;
- line-height: 1.75;
- margin-top: 4px;
- }
- .answer-line + .answer-line { margin-top: 4px; }
- .solution-step {
- align-items: center;
- gap: 6px;
- }
- .step-box { display: inline-block; }
- .step-label { white-space: nowrap; }
- .solution-heading { font-weight: 700; }
- .solution-content { display: inline-block; line-height: 1.75; }
- svg, .math-render svg { max-width: 100%; height: auto; display: block; }
- </style>
- </head>
- <body>
- <div class="page">
- <div class="header">
- <div style="font-size:22px;font-weight:bold;">判卷专用</div>
- <div style="font-size:18px;">{{ $paper->paper_name ?? '未命名试卷' }}</div>
- <div style="display:flex;justify-content:space-between;font-size:14px;margin-top:8px;">
- <span>老师:{{ $teacher['name'] ?? '________' }}</span>
- <span>年级:{{ $student['grade'] ?? '________' }}</span>
- <span>姓名:{{ $student['name'] ?? '________' }}</span>
- <span>得分:________</span>
- </div>
- </div>
- @include('components.exam.paper-body', ['questions' => $questions, 'grading' => true])
- </div>
- <!-- KaTeX -->
- <script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"></script>
- <script>
- document.addEventListener('DOMContentLoaded', function() {
- try {
- renderMathInElement(document.body, {
- delimiters: [
- {left: '$$', right: '$$', display: true},
- {left: '$', right: '$', display: false},
- {left: '\\\\(', right: '\\\\)', display: false},
- {left: '\\\\[', right: '\\\\]', display: true}
- ],
- throwOnError: false,
- strict: false,
- trust: true
- });
- } catch(e) {}
- });
- </script>
- </body>
- </html>
|