ddetail.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css" />
  10. <style>
  11. th{
  12. width: 20%;
  13. text-align: right;
  14. padding-right: 50px;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <div>
  20. <p><br></p>
  21. <h3 class="text-center">检查记录详情 &nbsp;&nbsp; <a href="{:url('Todo/daily',['orgId'=>$orgId,'id'=>$info['daily_id']])}"><span class="text-muted" style="font-size: 14px;">返回上一页</span></a></h3>
  22. <p><br></p>
  23. <table class="table table-striped text-left" style="width: 100%">
  24. <tr>
  25. <th>编号</th>
  26. <td>
  27. {$info['id']}
  28. </td>
  29. </tr>
  30. <tr>
  31. <th>任务地点名称</th>
  32. <td>
  33. {$info['daily_name']}
  34. </td>
  35. </tr>
  36. <tr>
  37. <th>任务详情</th>
  38. <td>
  39. {$info['daily_details']}
  40. </td>
  41. </tr>
  42. <tr>
  43. <th>工作人员</th>
  44. <td>
  45. {$info['user_name']}
  46. </td>
  47. </tr>
  48. <tr>
  49. <th>时间</th>
  50. <td>
  51. {$info['create_time']}
  52. </td>
  53. </tr>
  54. <tr>
  55. <th>工作表单</th>
  56. <td>
  57. <table class="table table-bordered">
  58. <thead>
  59. <tr>
  60. <th>序号</th>
  61. <th>内容</th>
  62. <th>完成</th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. {foreach $info['check_json'] as $k=>$v}
  67. <tr>
  68. <td>{$k+1}</td>
  69. <td>{$v['title']}</td>
  70. {if ($v['result'] == 1)}
  71. <td><input type="checkbox" checked disabled></td>
  72. {else}
  73. <td><input type="checkbox" disabled></td>
  74. {/if}
  75. </tr>
  76. {/foreach}
  77. </tbody>
  78. </table>
  79. </td>
  80. </tr>
  81. <tr>
  82. <th>内容</th>
  83. <td>
  84. {$info['content']}
  85. </td>
  86. </tr>
  87. <tr>
  88. <th>图片</th>
  89. <td>
  90. <img src="{$info['images']}" alt="" onclick="open_img(this)" style="width: 80px;height: 60px;" >
  91. </td>
  92. </tr>
  93. </table>
  94. <p><br></p>
  95. </div>
  96. <script src="/static/jquery-1.11.3.min.js"></script>
  97. <script src="/static/layer3.2.0/layer.js"></script>
  98. <script>
  99. function gotourl(_self) {
  100. window.location.href = $(_self).attr('data-url');
  101. }
  102. //打开查看图片
  103. function open_img(_self) {
  104. var src = $(_self).attr('src');
  105. var img = new Image();
  106. img.src = src;
  107. var width = $(window).width()*0.8;
  108. var height = $(window).height()*0.8;
  109. img.onload = function(){
  110. var imgw = img.width;
  111. var imgh = img.height;
  112. if(imgw > width&&imgh < height){
  113. imgh = imgh*width/imgw;
  114. imgw = width;
  115. }else if(imgw < width&&imgh > height){
  116. imgw = imgw*height/imgh;
  117. imgh = height;
  118. }else if(imgw > width&&imgh > height){
  119. var bl1 = width/height;
  120. var bl2 = imgw/imgh;
  121. if(bl1 < bl2){
  122. imgh = imgh*width/imgw;
  123. imgw = width;
  124. }else if(bl1 > bl2){
  125. imgw = imgw*height/imgh;
  126. imgh = height;
  127. }else{
  128. imgh = height;
  129. imgw = width;
  130. }
  131. }
  132. var imgs = '<img width="'+imgw+'" height="'+imgh+'" src="'+src+'" />';
  133. layer.open({
  134. type: 1,
  135. title: false,
  136. closeBtn: 1,
  137. area: [imgw+'px', imgh+'px'],
  138. skin: 'layui-layer-nobg', //没有背景色
  139. shadeClose: true,
  140. content: imgs
  141. });
  142. };
  143. }
  144. </script>
  145. </body>
  146. </html>