ocr-record-view.blade.php 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. <div>
  2. <div class="space-y-6">
  3. @php
  4. $record = $this->record();
  5. @endphp
  6. {{-- 面包屑导航 --}}
  7. <div class="breadcrumbs text-sm">
  8. <ul>
  9. <li>
  10. <a href="{{ route('filament.admin.pages.ocr-records') }}" class="text-primary hover:underline">
  11. OCR识别记录
  12. </a>
  13. </li>
  14. <li>记录详情</li>
  15. </ul>
  16. </div>
  17. @if($record)
  18. {{-- 基本信息卡片 --}}
  19. <div class="card bg-base-100 shadow-lg border">
  20. <div class="card-body">
  21. <div class="flex justify-between items-start mb-4">
  22. <h2 class="card-title text-xl">
  23. <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  24. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
  25. </svg>
  26. 基本信息
  27. </h2>
  28. <div class="flex gap-2">
  29. @php
  30. $statusConfig = $this->getStatusBadgeConfig($record->status);
  31. @endphp
  32. <span class="badge {{ $statusConfig['class'] }} badge-lg">
  33. {{ $statusConfig['text'] }}
  34. </span>
  35. @if($record->status === 'pending' || $record->status === 'failed')
  36. <button
  37. wire:click="startRecognition"
  38. class="btn btn-primary btn-sm"
  39. >
  40. <svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  41. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"></path>
  42. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  43. </svg>
  44. 开始识别
  45. </button>
  46. @endif
  47. <a href="{{ route('filament.admin.pages.ocr-records') }}" class="btn btn-ghost btn-sm">
  48. <svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  49. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path>
  50. </svg>
  51. 返回列表
  52. </a>
  53. </div>
  54. </div>
  55. <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
  56. <div class="stat bg-base-200 rounded-lg">
  57. <div class="stat-title">学生姓名</div>
  58. <div class="stat-value text-lg">{{ $record->student->name ?? '未知' }}</div>
  59. <div class="stat-desc">
  60. {{ $record->student->grade ?? '-' }} - {{ $record->student->class_name ?? '-' }}
  61. </div>
  62. </div>
  63. <div class="stat bg-base-200 rounded-lg">
  64. <div class="stat-title">图片名称</div>
  65. <div class="stat-value text-lg">{{ $record->image_filename }}</div>
  66. <div class="stat-desc">
  67. @if($record->image_size)
  68. {{ number_format($record->image_size / 1024, 2) }} KB
  69. @else
  70. -
  71. @endif
  72. </div>
  73. </div>
  74. <div class="stat bg-base-200 rounded-lg">
  75. <div class="stat-title">识别进度</div>
  76. <div class="stat-value text-lg">
  77. {{ $record->processed_questions ?? 0 }}/{{ $record->total_questions ?? 0 }}
  78. </div>
  79. <div class="stat-desc">
  80. @if($record->total_questions > 0)
  81. @php
  82. $percent = round(($record->processed_questions / $record->total_questions) * 100, 1);
  83. @endphp
  84. {{ $percent }}%
  85. @else
  86. 未开始
  87. @endif
  88. </div>
  89. </div>
  90. <div class="stat bg-base-200 rounded-lg">
  91. <div class="stat-title">平均置信度</div>
  92. <div class="stat-value text-lg">
  93. @if($record->confidence_avg)
  94. {{ number_format($record->confidence_avg * 100, 1) }}%
  95. @else
  96. -
  97. @endif
  98. </div>
  99. <div class="stat-desc">
  100. @if($record->confidence_avg)
  101. @if($record->confidence_avg >= 0.7)
  102. <span class="text-success">优秀</span>
  103. @elseif($record->confidence_avg >= 0.5)
  104. <span class="text-warning">良好</span>
  105. @else
  106. <span class="text-error">需改进</span>
  107. @endif
  108. @else
  109. 暂无数据
  110. @endif
  111. </div>
  112. </div>
  113. </div>
  114. @if($record->error_message)
  115. <div class="alert alert-error mt-4">
  116. <svg class="w-6 h-6 shrink-0 stroke-current" fill="none" viewBox="0 0 24 24">
  117. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  118. </svg>
  119. <div>
  120. <h3 class="font-bold">错误信息</h3>
  121. <div class="text-xs">{{ $record->error_message }}</div>
  122. </div>
  123. </div>
  124. @endif
  125. </div>
  126. </div>
  127. {{-- 图片预览卡片 --}}
  128. @if($record->image_path)
  129. <div class="card bg-base-100 shadow-lg border">
  130. <div class="card-body">
  131. <h2 class="card-title text-xl mb-4">
  132. <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  133. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
  134. </svg>
  135. 原图预览
  136. </h2>
  137. <div class="flex justify-center">
  138. <div class="max-w-4xl">
  139. <img
  140. src="{{ asset('storage/' . $record->image_path) }}"
  141. alt="卷子图片"
  142. class="w-full h-auto rounded-lg border"
  143. >
  144. </div>
  145. </div>
  146. <div class="mt-4 grid grid-cols-2 md:grid-cols-4 gap-4 text-sm">
  147. <div>
  148. <span class="text-gray-500">文件大小:</span>
  149. @if($record->image_size)
  150. {{ number_format($record->image_size / 1024, 2) }} KB
  151. @else
  152. -
  153. @endif
  154. </div>
  155. @if($record->image_width)
  156. <div>
  157. <span class="text-gray-500">宽度:</span>{{ $record->image_width }} px
  158. </div>
  159. @endif
  160. @if($record->image_height)
  161. <div>
  162. <span class="text-gray-500">高度:</span>{{ $record->image_height }} px
  163. </div>
  164. @endif
  165. <div>
  166. <span class="text-gray-500">创建时间:</span>
  167. {{ $record->created_at->format('Y-m-d H:i:s') }}
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. @endif
  173. {{-- 识别结果卡片 --}}
  174. <div class="card bg-base-100 shadow-lg border">
  175. <div class="card-body">
  176. <h2 class="card-title text-xl mb-4">
  177. <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  178. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
  179. </svg>
  180. 题目识别结果
  181. </h2>
  182. @if($record->questions && count($record->questions) > 0)
  183. <div class="space-y-4">
  184. @foreach($record->questions as $question)
  185. <div class="card bg-base-200 border">
  186. <div class="card-body">
  187. <div class="flex justify-between items-start">
  188. <div class="flex items-center gap-2">
  189. <span class="badge badge-primary badge-lg">
  190. 题目 {{ $question->question_number }}
  191. </span>
  192. @if($question->score_confidence)
  193. @php
  194. $confidence = $question->score_confidence * 100;
  195. $badgeClass = $confidence >= 70 ? 'badge-success' : ($confidence >= 50 ? 'badge-warning' : 'badge-error');
  196. @endphp
  197. <span class="badge {{ $badgeClass }}">
  198. 置信度: {{ number_format($confidence, 1) }}%
  199. </span>
  200. @endif
  201. @if($question->answer_verified)
  202. <span class="badge badge-success">
  203. <svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  204. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
  205. </svg>
  206. 已校验
  207. </span>
  208. @endif
  209. </div>
  210. @if($question->score_value !== null)
  211. <span class="badge badge-info badge-lg">
  212. 得分: {{ $question->score_value }}
  213. </span>
  214. @endif
  215. </div>
  216. <div class="divider my-2"></div>
  217. {{-- Question Text --}}
  218. <div class="mb-4">
  219. <h4 class="font-semibold text-sm text-gray-600 mb-2">题目内容:</h4>
  220. <div class="bg-base-100 p-4 rounded-lg border">
  221. @if($question->question_text)
  222. <p class="text-base leading-relaxed whitespace-pre-wrap">{{ $question->question_text }}</p>
  223. @else
  224. <p class="text-gray-400 italic">未识别到题目内容</p>
  225. @endif
  226. </div>
  227. </div>
  228. {{-- Student Answer Section --}}
  229. <div class="mb-4">
  230. <h4 class="font-semibold text-sm text-gray-600 mb-2">学生答案:</h4>
  231. <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
  232. {{-- OCR Result --}}
  233. <div>
  234. <label class="label">
  235. <span class="label-text text-xs">OCR 识别结果</span>
  236. </label>
  237. <div class="bg-base-100 p-3 rounded-lg border">
  238. @if($question->student_answer)
  239. <span class="text-lg font-bold text-primary">{{ $question->student_answer }}</span>
  240. @else
  241. <span class="text-gray-400 italic">未识别</span>
  242. @endif
  243. </div>
  244. </div>
  245. {{-- Manual Input --}}
  246. <div>
  247. <label class="label">
  248. <span class="label-text text-xs">手动校准 (可选)</span>
  249. </label>
  250. <input
  251. type="text"
  252. wire:model.defer="manualAnswers.{{ $question->id }}"
  253. placeholder="如 A, B, C, D 或留空使用 OCR 结果"
  254. class="input input-bordered input-primary w-full"
  255. maxlength="10"
  256. value="{{ $question->manual_answer }}"
  257. >
  258. </div>
  259. </div>
  260. </div>
  261. {{-- AI Analysis Results --}}
  262. @if($question->ai_score !== null || $question->ai_feedback !== null)
  263. <div class="bg-success/10 border border-success/30 rounded-lg p-4">
  264. <div class="flex items-center gap-2 text-success">
  265. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  266. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  267. </svg>
  268. <span class="font-medium">AI 智能分析结果</span>
  269. </div>
  270. @if($question->ai_score !== null)
  271. <div class="flex gap-4 mt-3">
  272. <div class="stat bg-base-100 rounded-lg border border-success/20">
  273. <div class="stat-title text-xs">AI 评分</div>
  274. <div class="stat-value text-2xl text-success">
  275. {{ $question->ai_score }}
  276. </div>
  277. <div class="stat-desc text-xs">满分100分</div>
  278. </div>
  279. @if($question->ai_confidence !== null)
  280. <div class="stat bg-base-100 rounded-lg border border-success/20">
  281. <div class="stat-title text-xs">置信度</div>
  282. <div class="stat-value text-lg text-success">
  283. {{ number_format($question->ai_confidence * 100, 1) }}%
  284. </div>
  285. <div class="stat-desc text-xs">AI 置信度</div>
  286. </div>
  287. @endif
  288. </div>
  289. @endif
  290. @if($question->ai_feedback)
  291. <div class="mt-3">
  292. <div class="text-sm font-medium text-gray-700 mb-1">AI 分析反馈:</div>
  293. <div class="bg-base-100 p-3 rounded-lg border border-success/20">
  294. <p class="text-sm">{{ $question->ai_feedback }}</p>
  295. </div>
  296. </div>
  297. @endif
  298. @if($question->ai_analysis_method)
  299. <div class="flex gap-2 mt-3 text-xs text-gray-500">
  300. <span class="badge badge-ghost">分析方法: {{ $question->ai_analysis_method }}</span>
  301. @if($question->ai_analyzed_at)
  302. <span class="badge badge-ghost">分析时间: {{ $question->ai_analyzed_at }}</span>
  303. @endif
  304. </div>
  305. @endif
  306. </div>
  307. @else
  308. <div class="bg-warning/10 border border-warning/30 rounded-lg p-4">
  309. <div class="flex items-center gap-2 text-warning">
  310. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  311. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  312. </svg>
  313. <span class="font-medium">AI 智能评分</span>
  314. </div>
  315. <p class="text-sm mt-2 text-gray-600">
  316. 提交答案后进行 AI 分析,将提供:正确性判断、详细反馈、知识点分析
  317. </p>
  318. </div>
  319. @endif
  320. {{-- Metadata --}}
  321. <div class="flex gap-4 mt-4 text-xs text-gray-500">
  322. @if($question->kp_code)
  323. <div>
  324. <span class="font-medium">知识点:</span>
  325. <span class="badge badge-info badge-xs">{{ $question->kp_code }}</span>
  326. </div>
  327. @endif
  328. @if($question->mark_detected)
  329. <div>
  330. <span class="font-medium">批改标记:</span>
  331. {!! $question->mark_badge ?? $question->mark_detected !!}
  332. </div>
  333. @endif
  334. </div>
  335. </div>
  336. </div>
  337. @endforeach
  338. {{-- Batch Submit Button --}}
  339. @if(!$this->hasAnalysisResults)
  340. <div class="card bg-primary/10 border border-primary">
  341. <div class="card-body">
  342. <div class="flex justify-between items-center">
  343. <div>
  344. <h3 class="font-bold text-lg">提交 AI 分析</h3>
  345. <p class="text-sm text-gray-600">
  346. 将使用手动校准的答案(如有),否则使用 OCR 识别结果
  347. </p>
  348. </div>
  349. <button
  350. wire:click="submitForAnalysis"
  351. class="btn btn-primary btn-lg"
  352. >
  353. <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  354. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
  355. </svg>
  356. 提交分析
  357. </button>
  358. </div>
  359. </div>
  360. </div>
  361. @else
  362. <div class="card bg-success/10 border border-success">
  363. <div class="card-body">
  364. <div class="flex justify-between items-center">
  365. <div>
  366. <h3 class="font-bold text-lg text-success">AI 分析已完成</h3>
  367. <p class="text-sm text-gray-600">
  368. 所有题目已完成 AI 智能分析,查看上方各题目的分析结果
  369. </p>
  370. @if($record->ai_analyzed_at)
  371. <p class="text-sm text-gray-500">
  372. 分析完成时间:{{ $record->ai_analyzed_at }}
  373. @if($record->ai_analysis_count)
  374. | 分析题目数:{{ $record->ai_analysis_count }}
  375. @endif
  376. </p>
  377. @endif
  378. </div>
  379. <div class="badge badge-success badge-lg">
  380. <svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  381. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  382. </svg>
  383. 已分析
  384. </div>
  385. </div>
  386. </div>
  387. </div>
  388. @endif
  389. </div>
  390. @else
  391. <div class="text-center py-8 text-gray-500">
  392. <svg class="w-12 h-12 mx-auto mb-3 opacity-50" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  393. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
  394. </svg>
  395. <p>暂无识别结果</p>
  396. @if($record->status === 'pending')
  397. <p class="text-sm mt-2">点击上方"开始识别"按钮开始处理</p>
  398. @endif
  399. </div>
  400. @endif
  401. </div>
  402. </div>
  403. {{-- 时间线卡片 --}}
  404. <div class="card bg-base-100 shadow-lg border">
  405. <div class="card-body">
  406. <h2 class="card-title text-xl mb-4">
  407. <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  408. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  409. </svg>
  410. 处理时间线
  411. </h2>
  412. <ul class="timeline timeline-snap-icon max-md:timeline-compact timeline-vertical">
  413. <li>
  414. <div class="timeline-middle">
  415. <div class="badge badge-success">
  416. <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  417. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
  418. </svg>
  419. </div>
  420. </div>
  421. <div class="timeline-start mb-10">
  422. <time class="font-mono italic text-sm">{{ $record->created_at->format('Y-m-d H:i:s') }}</time>
  423. <div class="text-lg font-black">上传成功</div>
  424. <p class="text-sm">卷子图片已上传,等待OCR识别</p>
  425. </div>
  426. <hr class="bg-success" />
  427. </li>
  428. @if($record->status === 'processing')
  429. <li>
  430. <div class="timeline-middle">
  431. <div class="badge badge-info animate-pulse">
  432. <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  433. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
  434. </svg>
  435. </div>
  436. </div>
  437. <div class="timeline-start mb-10">
  438. <time class="font-mono italic text-sm">{{ now()->format('Y-m-d H:i:s') }}</time>
  439. <div class="text-lg font-black text-info">处理中</div>
  440. <p class="text-sm">OCR识别正在进行中...</p>
  441. </div>
  442. <hr class="bg-info" />
  443. </li>
  444. @elseif($record->status === 'completed')
  445. <li>
  446. <div class="timeline-middle">
  447. <div class="badge badge-success">
  448. <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  449. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
  450. </svg>
  451. </div>
  452. </div>
  453. <div class="timeline-start mb-10">
  454. <time class="font-mono italic text-sm">{{ $record->processed_at?->format('Y-m-d H:i:s') }}</time>
  455. <div class="text-lg font-black text-success">处理完成</div>
  456. <p class="text-sm">OCR识别已完成,识别出 {{ $record->total_questions ?? 0 }} 道题目</p>
  457. </div>
  458. <hr class="bg-success" />
  459. </li>
  460. @elseif($record->status === 'failed')
  461. <li>
  462. <div class="timeline-middle">
  463. <div class="badge badge-error">
  464. <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  465. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
  466. </svg>
  467. </div>
  468. </div>
  469. <div class="timeline-start mb-10">
  470. <time class="font-mono italic text-sm">{{ now()->format('Y-m-d H:i:s') }}</time>
  471. <div class="text-lg font-black text-error">处理失败</div>
  472. @if($record->error_message)
  473. <p class="text-sm text-error">{{ $record->error_message }}</p>
  474. @endif
  475. </div>
  476. <hr class="bg-error" />
  477. </li>
  478. @endif
  479. {{-- AI Analysis Timeline --}}
  480. @if($record->status === 'completed' && $record->ai_analyzed_at)
  481. <li>
  482. <div class="timeline-middle">
  483. <div class="badge badge-info">
  484. <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  485. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
  486. </svg>
  487. </div>
  488. </div>
  489. <div class="timeline-start mb-10">
  490. <time class="font-mono italic text-sm">{{ $record->ai_analyzed_at }}</time>
  491. <div class="text-lg font-black text-info">AI 分析完成</div>
  492. <p class="text-sm">
  493. 已完成 {{ $record->ai_analysis_count ?? count($record->questions) }} 道题目的智能分析
  494. </p>
  495. <div class="flex gap-2 mt-2">
  496. <span class="badge badge-success badge-xs">
  497. <svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  498. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  499. </svg>
  500. 智能分析
  501. </span>
  502. <span class="badge badge-info badge-xs">学习分析</span>
  503. <span class="badge badge-warning badge-xs">掌握度评估</span>
  504. </div>
  505. </div>
  506. <hr class="bg-info" />
  507. </li>
  508. @endif
  509. </ul>
  510. </div>
  511. </div>
  512. @else
  513. <div class="card bg-base-100 shadow-lg border">
  514. <div class="card-body">
  515. <div class="alert alert-error">
  516. <svg class="w-6 h-6 shrink-0 stroke-current" fill="none" viewBox="0 0 24 24">
  517. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  518. </svg>
  519. <div>
  520. <h3 class="font-bold">记录不存在</h3>
  521. <div class="text-xs">找不到ID为 {{ $recordId }} 的OCR记录</div>
  522. </div>
  523. </div>
  524. <div class="mt-4">
  525. <a href="{{ route('filament.admin.pages.ocr-records') }}" class="btn btn-primary">
  526. <svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  527. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path>
  528. </svg>
  529. 返回列表
  530. </a>
  531. </div>
  532. </div>
  533. </div>
  534. @endif
  535. </div>
  536. </div>