paper-image.blade.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. {{-- 试卷图片组件(仅OCR场景) --}}
  2. <div class="card bg-base-100 shadow-lg border">
  3. <div class="card-body">
  4. <h3 class="card-title text-lg mb-4">
  5. <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  6. <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>
  7. </svg>
  8. 试卷图片
  9. </h3>
  10. <div class="relative">
  11. <img
  12. src="{{ asset($recordData['image_path']) }}"
  13. alt="试卷图片"
  14. class="w-full rounded-lg border shadow-sm"
  15. onerror="this.src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAwIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDQwMCAzMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSI0MDAiIGhlaWdodD0iMzAwIiBmaWxsPSIjRjNGNEY2Ii8+Cjx0ZXh0IHg9IjIwMCIgeT0iMTUwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNjc3NDg4IiBmb250LXNpemU9IjE0Ij7lm77niYfliqDovb3lpLHotKU8L3RleHQ+Cjwvc3ZnPg=='"
  16. >
  17. @if($recordData['status'] === 'processing')
  18. <div class="absolute inset-0 bg-black bg-opacity-50 rounded-lg flex items-center justify-center">
  19. <div class="text-center text-white">
  20. <div class="loading loading-spinner loading-lg"></div>
  21. <p class="mt-2">识别处理中...</p>
  22. </div>
  23. </div>
  24. @endif
  25. </div>
  26. <div class="mt-4 text-sm text-gray-600">
  27. <p>文件名: {{ $recordData['image_filename'] ?? '' }}</p>
  28. @if(isset($recordData['image_width']) && isset($recordData['image_height']) && $recordData['image_width'] && $recordData['image_height'])
  29. <p>尺寸: {{ $recordData['image_width'] }} × {{ $recordData['image_height'] }} px</p>
  30. @endif
  31. @if(isset($recordData['image_size']) && $recordData['image_size'])
  32. <p>大小: {{ number_format($recordData['image_size'] / 1024, 1) }} KB</p>
  33. @endif
  34. </div>
  35. </div>
  36. </div>