sysw.html 11 KB

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