syqb.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <title>湖北智慧水运</title>
  9. <link href="../css/mui.min.css" rel="stylesheet">
  10. <script type="text/javascript" src="../js/iscroll.js" charset="utf-8"></script>
  11. <script type="text/javascript" src="../js/zepto.min.js"></script>
  12. <script type="text/javascript">
  13. var page =1;
  14. var rows =10;
  15. $(function(){
  16. $.ajax({
  17. type: 'post',
  18. url: '../../qbcontroller/querySyqb.do',
  19. data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows,no:"",title:$("#title").val(),start:"",stop:"",code:getQueryString("code")},
  20. dataType: 'json',
  21. success: function(data){
  22. var result = '';
  23. if(data.length==0)
  24. {
  25. layer.open({
  26. shade:false,
  27. content: '没有相关数据',
  28. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  29. time: 1
  30. });
  31. $('.lists').html('');
  32. return;
  33. }
  34. for(var i = 0; i < data.length; i++){
  35. result += '<li class="mui-table-view-cell mui-media"><a onclick="window.open(\'info.html?hname=sy&hname=sy&isDone='+data[i].isDone+'&id='+data[i].id+'\')" href="javascript:void(0)" >'+
  36. '<div class="mui-media-body">'+data[i].title+
  37. '<p class="mui-ellipsis">当前环节:<span style="color:rgb(33, 150, 243);">'+data[i].status+'</span> 送办日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].addDate)+'</span></p>'+
  38. '</div>'+
  39. '</a></li>';
  40. }
  41. $('.lists').html('');
  42. $('.lists').prepend(result);
  43. if(data.length>=rows){
  44. showJZ();
  45. }else{
  46. hideJZ();
  47. }
  48. myScroll.refresh();
  49. }})
  50. $("#sousuo").on("click",function(){
  51. // var title=$("#title").val();
  52. page = 1;
  53. $.ajax({
  54. type: 'post',
  55. url: '../../qbcontroller/querySyqb.do',
  56. data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows,no:"",title:$("#title").val(),start:"",stop:""},
  57. dataType: 'json',
  58. success: function(data){
  59. if(data.length<1){
  60. layer.open({
  61. shade:false,
  62. content: '没有搜索到相关数据',
  63. style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center',
  64. time: 1
  65. });
  66. $('.lists').html('');
  67. return;
  68. }else{
  69. var result = '';
  70. for(var i = 0; i < data.length; i++){
  71. result += '<li class="mui-table-view-cell mui-media"><a onclick="window.open(\'info.html?hname=sy&isDone='+data[i].isDone+'&id='+data[i].id+'\')" href="javascript:void(0)" >'+
  72. '<div class="mui-media-body">'+data[i].title+
  73. '<p class="mui-ellipsis">当前环节:<span style="color:rgb(33, 150, 243);">'+data[i].status+'</span> 送办日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].addDate)+'</span></p>'+
  74. '</div>'+
  75. '</a></li>';
  76. }
  77. if(data.length<rows){
  78. hideJZ();
  79. }else{
  80. showJZ();
  81. }
  82. $('.lists').html('');
  83. $('.lists').prepend(result);
  84. myScroll.refresh();
  85. }
  86. }})
  87. })
  88. })
  89. var myScroll,
  90. pullDownEl, pullDownOffset,
  91. pullUpEl, pullUpOffset,
  92. generatedCount = 0;
  93. function pullDownAction () {
  94. page = 1;
  95. $.ajax({
  96. type: 'post',
  97. url: '../../qbcontroller/querySyqb.do',
  98. data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows,no:"",title:$("#title").val(),start:"",stop:""},
  99. dataType: 'json',
  100. success: function(data){
  101. var result = '';
  102. for(var i = 0; i < data.length; i++){
  103. result += '<li class="mui-table-view-cell mui-media"><a onclick="window.open(\'syfwinfo.html?hname=sy&isDone='+data[i].isDone+'&id='+data[i].id+'\')" href="javascript:void(0)" >'+
  104. '<div class="mui-media-body">'+data[i].title+
  105. '<p class="mui-ellipsis">当前环节:<span style="color:rgb(33, 150, 243);">'+data[i].status+'</span> 送办日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].addDate)+'</span></p>'+
  106. '</div>'+
  107. '</a></li>';
  108. }
  109. $('.lists').html('');
  110. $('.lists').prepend(result);
  111. if(data.length>=rows){
  112. showJZ();
  113. }else{
  114. hideJZ();
  115. }
  116. myScroll.refresh();
  117. }})
  118. }
  119. function pullUpAction () {
  120. page+=1;
  121. $.ajax({
  122. type: 'post',
  123. url: '../../qbcontroller/querySyqb.do',
  124. data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows,no:"",title:$("#title").val(),start:"",stop:""},
  125. dataType: 'json',
  126. success: function(data){
  127. var result = '';
  128. for(var i = 0; i < data.length; i++){
  129. result += '<li class="mui-table-view-cell mui-media"><a onclick="window.open(\'syfwinfo.html?hname=sy&isDone='+data[i].isDone+'&id='+data[i].id+'\')" href="javascript:void(0)">'+
  130. '<div class="mui-media-body">'+data[i].title+
  131. '<p class="mui-ellipsis">当前环节:<span style="color:rgb(33, 150, 243);">'+data[i].status+'</span> 送办日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].addDate)+'</span></p>'+
  132. '</div>'+
  133. '</a></li>';
  134. }
  135. $('.lists').append(result);
  136. if(data.length<rows){
  137. wcJZ();
  138. }
  139. myScroll.refresh();
  140. }})
  141. }
  142. function loaded() {
  143. pullDownEl = document.getElementById('pullDown');
  144. pullDownOffset = pullDownEl.offsetHeight;
  145. pullUpEl = document.getElementById('pullUp');
  146. pullUpOffset = pullUpEl.offsetHeight;
  147. myScroll = new iScroll('wrapper', {
  148. useTransition: true,
  149. topOffset: pullDownOffset,
  150. onRefresh: function () {
  151. if (pullDownEl.className.match('loading')) {
  152. pullDownEl.className = '';
  153. pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
  154. } else if (pullUpEl.className.match('loading')) {
  155. pullUpEl.className = '';
  156. pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
  157. }
  158. },
  159. onScrollMove: function () {
  160. if (this.y > 5 && !pullDownEl.className.match('flip')) {
  161. pullDownEl.className = 'flip';
  162. pullDownEl.querySelector('.pullDownLabel').innerHTML = '松手刷新...';
  163. this.minScrollY = 0;
  164. } else if (this.y < 5 && pullDownEl.className.match('flip')) {
  165. pullDownEl.className = '';
  166. pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
  167. this.minScrollY = -pullDownOffset;
  168. } else if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
  169. pullUpEl.className = 'flip';
  170. pullUpEl.querySelector('.pullUpLabel').innerHTML = '松手加载...';
  171. this.maxScrollY = this.maxScrollY;
  172. } else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
  173. pullUpEl.className = '';
  174. pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
  175. this.maxScrollY = pullUpOffset;
  176. }
  177. },
  178. onScrollEnd: function () {
  179. if (pullDownEl.className.match('flip')) {
  180. pullDownEl.className = 'loading';
  181. pullDownEl.querySelector('.pullDownLabel').innerHTML = '载入中...';
  182. pullDownAction(); // Execute custom function (ajax call?)
  183. } else if (pullUpEl.className.match('flip')) {
  184. pullUpEl.className = 'loading';
  185. pullUpEl.querySelector('.pullUpLabel').innerHTML = '载入中...';
  186. pullUpAction(); // Execute custom function (ajax call?)
  187. }
  188. }
  189. });
  190. setTimeout(function () { document.getElementById('wrapper').style.left = '0'; }, 800);
  191. }
  192. document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
  193. document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false);
  194. </script>
  195. <style type="text/css" media="all">
  196. #header {
  197. position:absolute; z-index:2;
  198. top:0; left:0;
  199. width:100%;
  200. height:45px;
  201. line-height:45px;
  202. padding:0;
  203. color:#eee;
  204. font-size:22px;
  205. text-align:center;
  206. color:white;
  207. background: #2196f3;
  208. }
  209. .sousuotiaojian{
  210. position: absolute;
  211. left:0px;
  212. margin:0px;
  213. top:45px;
  214. height:48px;
  215. line-height:48px;
  216. text-align: center
  217. ;padding-left: 5px;
  218. padding-right: 5px;
  219. position: relative;
  220. border: 1px solid gray;
  221. border-radius:5px;
  222. }
  223. #header a {
  224. color:white;
  225. text-decoration:none;
  226. }
  227. #wrapper {
  228. position:absolute; z-index:1;
  229. top:110px; bottom:0px; left:-9999px;
  230. width:100%;
  231. overflow:auto;
  232. }
  233. #scroller {
  234. position:absolute; z-index:1;
  235. /* -webkit-touch-callout:none;*/
  236. -webkit-tap-highlight-color:rgba(0,0,0,0);
  237. width:100%;
  238. padding:0;
  239. }
  240. #myFrame {
  241. position:absolute;
  242. top:0; left:0;
  243. }
  244. /**
  245. *
  246. * Pull down styles
  247. *
  248. */
  249. #pullDown, #pullUp {
  250. background:#fff;
  251. height:45px;
  252. line-height:45px;
  253. font-weight:bold;
  254. font-size:14px;
  255. color:#888;
  256. padding-left: 50%;
  257. margin-left:-54.5px;
  258. }
  259. #pullDown .pullDownIcon, #pullUp .pullUpIcon {
  260. display:block; float:left;
  261. width:40px; height:40px;
  262. background:url(../images/pull-icon@2x.png) 0 0 no-repeat;
  263. -webkit-background-size:40px 80px; background-size:40px 80px;
  264. -webkit-transition-property:-webkit-transform;
  265. -webkit-transition-duration:250ms;
  266. }
  267. #pullDown .pullDownIcon {
  268. -webkit-transform:rotate(0deg) translateZ(0);
  269. }
  270. #pullUp .pullUpIcon {
  271. -webkit-transform:rotate(-180deg) translateZ(0);
  272. }
  273. #pullDown.flip .pullDownIcon {
  274. -webkit-transform:rotate(-180deg) translateZ(0);
  275. }
  276. #pullUp.flip .pullUpIcon {
  277. -webkit-transform:rotate(0deg) translateZ(0);
  278. }
  279. #pullDown.loading .pullDownIcon, #pullUp.loading .pullUpIcon {
  280. background-position:0 100%;
  281. -webkit-transform:rotate(0deg) translateZ(0);
  282. -webkit-transition-duration:0ms;
  283. -webkit-animation-name:loading;
  284. -webkit-animation-duration:2s;
  285. -webkit-animation-iteration-count:infinite;
  286. -webkit-animation-timing-function:linear;
  287. }
  288. @-webkit-keyframes loading {
  289. from { -webkit-transform:rotate(0deg) translateZ(0); }
  290. to { -webkit-transform:rotate(360deg) translateZ(0); }
  291. }
  292. ul,li{padding: 0px;margin: 0px;}
  293. </style>
  294. </head>
  295. <body>
  296. <div id="header"><a>所有签报</a></div>
  297. <div class="sousuotiaojian">
  298. <input id="title" value="" type="text" style="width: 100%;background: white;color: gray;border: 0px">
  299. <img id="sousuo" alt="" src="../images/search-icon.png" style="width: 26px;height: 26px;position: absolute;top: 10px;right: 10px">
  300. </div>
  301. <div id="wrapper">
  302. <div id="scroller">
  303. <div id="pullDown" >
  304. <div><span class="pullDownIcon"></span><span class="pullDownLabel">下拉刷新...</span></div>
  305. </div>
  306. <div id="mui-content">
  307. <ul id="thelist mui-table-view" class="lists">
  308. </ul>
  309. </div>
  310. <div id="pullUp">
  311. </div>
  312. </div>
  313. </div>
  314. </body>
  315. </html>