ybfw.html 11 KB

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