syfw.html 11 KB

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