daily_list.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=daily-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. <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
  9. <link rel="stylesheet" href="/static/dropload-gh-pages/dropload.css">
  10. <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
  11. <script type="text/javascript" src="/static/dropload-gh-pages/dropload.min.js"></script>
  12. <script type="text/javascript" src="/static/layer/layer.js"></script>
  13. <link rel="stylesheet" href="/static/h5/css/common.css">
  14. <title>列表</title>
  15. <style>
  16. body{
  17. background-color: #F1F1F1;
  18. }
  19. .container{
  20. max-width: 750px;
  21. height: auto;
  22. margin: 0 auto;
  23. padding: 0px 6px;
  24. }
  25. .daily-lists{
  26. width: 100%;
  27. height: auto;
  28. margin-bottom: 30px;
  29. }
  30. .daily-info{
  31. width: 100%;
  32. height: 100px;
  33. border-radius: 10px;
  34. margin-top: 5px;
  35. background-color: #ffffff;
  36. padding: 0px 13px;
  37. }
  38. .daily-info-title{
  39. width: 100%;
  40. height: 40px;
  41. line-height: 40px;
  42. font-size: 15px;
  43. font-weight: 600;
  44. letter-spacing: 1px;
  45. color: var(--themeColor);
  46. border-bottom:1.2px solid #F1F1F1;
  47. }
  48. .daily-info-content{
  49. width: 100%;
  50. height: 60px;
  51. }
  52. .daily-info-user{
  53. width: 100%;
  54. height: 30px;
  55. line-height: 30px;
  56. }
  57. .left{
  58. width: 30%;
  59. height: 30px;
  60. line-height: 30px;
  61. display: inline-block;
  62. font-size: 14px;
  63. float: left;
  64. }
  65. .right{
  66. width: 66%;
  67. height: 30px;
  68. line-height: 30px;
  69. display: inline-block;
  70. float: right;
  71. font-size: 13px;
  72. color: #A9A9A9;
  73. overflow: hidden;
  74. text-align: right;
  75. }
  76. .daily-info-time{
  77. width: 100%;
  78. height: 30px;
  79. line-height: 30px;
  80. }
  81. .nulldata{
  82. width: 100%;
  83. height: 200px;
  84. text-align: center;
  85. position: fixed;
  86. top: 22%;
  87. }
  88. .nulldata img{
  89. width: 200px;
  90. height: 160px;
  91. text-align: center;
  92. }
  93. .nulldata-text{
  94. margin-top: 15px;
  95. font-size: 14px;
  96. letter-spacing: 2px;
  97. text-align: center;
  98. }
  99. .footer-back{
  100. position: fixed;
  101. z-index: 1000;
  102. width: 100%;
  103. height: 45px;
  104. line-height: 45px;
  105. background-color: #ffffff;
  106. bottom: 0;
  107. left: 0;
  108. box-shadow: 0px 0px 10px 0px rgba(26, 25, 26, 0.05);
  109. display: table-cell;
  110. vertical-align: middle;
  111. text-align: center;
  112. }
  113. .footer-back a img{
  114. width: 43px;
  115. height: 43px;
  116. }
  117. </style>
  118. </head>
  119. <body>
  120. {if $list}
  121. <div class="container">
  122. <div class="daily-lists">
  123. {foreach $list as $k=>$v}
  124. <div class="daily-info">
  125. <div class="daily-info-title">{$v['title']}</div>
  126. <div class="daily-info-content">
  127. <div class="daily-info-user">
  128. <div class="left">工作人员:</div>
  129. <div class="right">{$v['work_user']}</div>
  130. </div>
  131. {if $v['enable'] == 1}
  132. <div class="daily-info-time">
  133. <div class="left">状态:</div>
  134. <div class="right">可用</div>
  135. </div>
  136. {else /}
  137. <div class="daily-info-time">
  138. <div class="left">状态:</div>
  139. <div class="right">不可用</div>
  140. </div>
  141. {/if}
  142. </div>
  143. </div>
  144. {/foreach}
  145. </div>
  146. </div>
  147. {else /}
  148. <div class="nulldata">
  149. <img src="/img/nulldata.png" alt="">
  150. <div class="nulldata-text">空空如也 ~</div>
  151. </div>
  152. {/if}
  153. <div class="footer-back">
  154. <a href="javascript:;" onclick="javascript:history.back(-1);"><img src="/img/back.png"></a>
  155. </div>
  156. </body>
  157. </html>
  158. <script>
  159. var orgId = '{$orgId}';
  160. var day= '{$day}';
  161. $(function(){
  162. // 页数
  163. var page = 1;
  164. // 每页展示20个
  165. var size = 20;
  166. // dropload
  167. $('.container').dropload({
  168. scrollArea : window,
  169. domDown : {
  170. domClass : 'dropload-down',
  171. domRefresh : '<div class="dropload-refresh">↑上拉加载更多</div>',
  172. domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
  173. domNoData : '<div class="dropload-noData"></div>'
  174. },
  175. loadDownFn : function(me){
  176. page++;
  177. // 拼接HTML
  178. var result = '';
  179. var url= "{:url('Statistics/dailyList')}";
  180. $.ajax({
  181. type: 'GET',
  182. url: url+'?page='+page+'&size='+size+'&orgId='+orgId+'&day='+day,
  183. dataType: 'json',
  184. success: function(res){
  185. var data = res.data;
  186. var arrLen = data.length;
  187. if(arrLen > 0){
  188. for(var i = 0; i < data.length; i++){
  189. if(arrLen > 0){
  190. result +='<div class="daily-info">';
  191. result +='<div class="daily-info-title">'+data[i].title+'</div>';
  192. result +='<div class="daily-info-content">';
  193. result +='<div class="daily-info-user">';
  194. result +='<div class="left">工作人员:</div>';
  195. result +='<div class="right">'+data[i].workUser+'</div>';
  196. result +='</div>';
  197. if(data[i].enable == 1){
  198. result +='<div class="device-info-time">';
  199. result +='<div class="left">状态:</div>';
  200. result +='<div class="right">可用</div>';
  201. }else {
  202. result +='<div class="device-info-time">';
  203. result +='<div class="left">状态:</div>';
  204. result +='<div class="right">不可用</div>';
  205. }
  206. result +='</div>';
  207. result +='</div>';
  208. result +='</div>';
  209. }
  210. }
  211. // 如果没有数据
  212. }else{
  213. // 锁定
  214. me.lock();
  215. // 无数据
  216. me.noData();
  217. }
  218. //延迟1秒加载
  219. setTimeout(function(){
  220. // 插入数据到页面,放到最后面
  221. $('.daily-lists').append(result);
  222. // 每次数据插入,必须重置
  223. me.resetload();
  224. },1000);
  225. },
  226. error: function(xhr, type){
  227. // 即使加载出错,也得重置
  228. me.resetload();
  229. }
  230. });
  231. },
  232. threshold : 50
  233. });
  234. });
  235. </script>