sign_table.blade.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <title>考生考场座位贴</title>
  9. <style>
  10. .room{
  11. width: 100%;
  12. }
  13. .room h2{
  14. text-align: center;
  15. }
  16. .room .list .item{
  17. width: 200px;
  18. text-align: center;
  19. line-height: 40px;
  20. font-weight: bold;
  21. font-size: 20px;
  22. float: left;
  23. }
  24. .room .list .item .avatar{
  25. width: 180px;
  26. height: 253px;
  27. }
  28. .room .list .item .text{
  29. font-weight: normal;
  30. }
  31. </style>
  32. </head>
  33. <body>
  34. @foreach($data as $k=>$v)
  35. <h1>
  36. 考场名称:{{ $k }}
  37. </h1>
  38. @foreach($v as $kk => $vv)
  39. <div class="room clearfix">
  40. <h2>
  41. {{ $k }} 考生进出考场签到表
  42. </h2>
  43. <div class="list">
  44. @foreach($vv as $key => $val)
  45. <div class="item">
  46. <div class="avatar">
  47. <img src="{{$val['avatar']}}" width="170" height="247" />
  48. </div>
  49. <div class="info">
  50. {{$val['seat']}}&nbsp;&nbsp;{{$val['realname']}}
  51. </div>
  52. <div class="text">
  53. 进场:__________
  54. </div>
  55. <div class="text">
  56. 离场:__________
  57. </div>
  58. </div>
  59. @endforeach
  60. </div>
  61. </div>
  62. <div class="print" style="margin: 10px 0;text-align: center">
  63. <button class="print_page btn btn-sm btn-info" style="width: 200px;height: 60px;font-size: 30px;line-height: 40px">打印此页</button>
  64. </div>
  65. @endforeach
  66. @endforeach
  67. <div id="print_body" ></div>
  68. <script type="text/javascript" src="{{ theme_asset('app/js/hiprint/polyfill.min.js') }}"></script>
  69. <script type="text/javascript" src="{{ theme_asset('app/js/hiprint/hiprint.bundle.js') }}"></script>
  70. <script type="text/javascript" src="{{ theme_asset('app/js/hiprint/plugins/JsBarcode.all.min.js') }}"></script>
  71. <script type="text/javascript" src="{{ theme_asset('app/js/hiprint/plugins/qrcode.js') }}"></script>
  72. <script type="text/javascript" src="{{ theme_asset('app/js/jQuery.print.js') }}"></script>
  73. <script>
  74. $(".print_page").on('mouseover',function(){
  75. var dom = $(this).parent().prev();
  76. $(dom).addClass('selected')
  77. });
  78. $(".print_page").on('mouseout',function(){
  79. var dom = $(this).parent().prev();
  80. $(dom).removeClass('selected')
  81. });
  82. $(".print_page").on('click',function(){
  83. var dom = $(this).parent().prev();
  84. console.log(dom)
  85. $(dom).print()
  86. });
  87. </script>
  88. </body>
  89. </html>