ybfw.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <!doctype html>
  2. <html lang="zh-cn">
  3. <head>
  4. <meta name="viewport" content="initial-scale=1, user-scalable=0, minimal-ui" charset="UTF-8">
  5. <title>湖北智慧水运</title>
  6. <link href="../css/mui.min.css" rel="stylesheet">
  7. <style>
  8. *{
  9. margin: 0;
  10. padding:0;
  11. -webkit-tap-highlight-color:rgba(0,0,0,0);
  12. -webkit-text-size-adjust:none;
  13. }
  14. html{
  15. font-size:10px;
  16. }
  17. body{
  18. background-color: #f5f5f5;
  19. font-size: 1.2em;
  20. }
  21. .outer{
  22. position: absolute;
  23. left: 0;
  24. top: 0;
  25. width: 100%;
  26. height: 100%;
  27. display: -webkit-box;
  28. display: -webkit-flex;
  29. display: -ms-flexbox;
  30. display: flex;
  31. -ms-flex-direction:column;
  32. -webkit-box-orient:vertical;
  33. box-orient:vertical;
  34. -webkit-flex-direction:column;
  35. flex-direction:column;
  36. }
  37. .header{
  38. position: relative;
  39. background-color: #eee;
  40. height:48px;
  41. line-height:48px;
  42. color:white;
  43. background: #2196f3;
  44. }
  45. .sousuo{
  46. position: relative;
  47. top:50px;
  48. background-color: #eee;
  49. height:48px;
  50. line-height:48px;
  51. color:white;
  52. background: white;
  53. }
  54. .header .btn{
  55. position: absolute;
  56. right: 0;
  57. top: 0;
  58. width: 4em;
  59. height: 100%;
  60. text-align: center;
  61. color: #06c;
  62. font-size: 1.4rem;
  63. background-color: #ccc;
  64. }
  65. .header .btn:active{
  66. background-color: #aaa;
  67. color: #fff;
  68. }
  69. .inner{
  70. -webkit-box-flex: 1;
  71. -webkit-flex: 1;
  72. -ms-flex: 1;
  73. flex: 1;
  74. background-color: #fff;
  75. overflow-y: scroll;
  76. -webkit-overflow-scrolling: touch;
  77. }
  78. .inner .item{
  79. display: -webkit-box;
  80. display: -webkit-flex;
  81. display: -ms-flexbox;
  82. display: flex;
  83. -ms-flex-align:center;
  84. -webkit-box-align:center;
  85. box-align:center;
  86. -webkit-align-items:center;
  87. align-items:center;
  88. padding:3.125%;
  89. border-bottom: 1px solid #ddd;
  90. color: #333;
  91. }
  92. .inner .item img{
  93. display: block;
  94. width: 40px;
  95. height: 40px;
  96. border:1px solid #ddd;
  97. }
  98. .inner .item h3{
  99. display: block;
  100. -webkit-box-flex: 1;
  101. -webkit-flex: 1;
  102. -ms-flex: 1;
  103. flex: 1;
  104. width: 100%;
  105. max-height: 40px;
  106. overflow: hidden;
  107. line-height: 20px;
  108. margin: 0 10px;
  109. font-size: 1.2rem;
  110. }
  111. .inner .item .date{
  112. display: block;
  113. height: 20px;
  114. line-height: 20px;
  115. color: #999;
  116. }
  117. .opacity{
  118. -webkit-animation: opacity 0.5s linear;
  119. animation: opacity 0.5s linear;
  120. }
  121. @-webkit-keyframes opacity {
  122. 0% {
  123. opacity:0;
  124. }
  125. 100% {
  126. opacity:1;
  127. }
  128. }
  129. @keyframes opacity {
  130. 0% {
  131. opacity:0;
  132. }
  133. 100% {
  134. opacity:1;
  135. }
  136. }
  137. /* dropload */
  138. .dropload-up,.dropload-down{
  139. position: relative;
  140. height: 0;
  141. overflow: hidden;
  142. -webkit-transform:translate3d(0,0,0);
  143. transform:translate3d(0,0,0);
  144. }
  145. .dropload-refresh,.dropload-update,.dropload-load{
  146. position: absolute;
  147. font-size:15px;
  148. left: 50%;
  149. bottom: 0;
  150. width: 100%;
  151. height: 50px;
  152. line-height: 50px;
  153. text-align: center;
  154. -webkit-transform:translate(-50%,0);
  155. transform:translate(-50%,0);
  156. }
  157. @-webkit-keyframes rotate {
  158. 0% {
  159. -webkit-transform: rotate(0deg);
  160. }
  161. 50% {
  162. -webkit-transform: rotate(180deg);
  163. }
  164. 100% {
  165. -webkit-transform: rotate(360deg);
  166. }
  167. }
  168. @keyframes rotate {
  169. 0% {
  170. transform: rotate(0deg);
  171. }
  172. 50% {
  173. transform: rotate(180deg);
  174. }
  175. 100% {
  176. transform: rotate(360deg);
  177. }
  178. }
  179. </style>
  180. </head>
  181. <body>
  182. <div class="outer">
  183. <div class="header">
  184. <h3>已办发文</h3>
  185. <a href="javascript:;" class="btn lock" style="display: none;">锁定</a>
  186. </div>
  187. <div class="inner">
  188. <ul class="mui-table-view lists">
  189. </ul>
  190. </div>
  191. </div>
  192. <script src="../js/zepto.min.js"></script>
  193. <script src="../js/dropload.min.js"></script>
  194. <script>
  195. // 按钮操作
  196. var page =1;
  197. var rows = 10;
  198. $(function(){
  199. $.ajax({
  200. type: 'post',
  201. url: '../../fwcontroller/ybfw.do',
  202. data:{uid:"402881e44e86c26d014e86c8062b0004",page:page,rows:rows,no:"",title:"",start:"",stop:""},
  203. dataType: 'json',
  204. success: function(data){
  205. var result = '';
  206. for(var i = 0; i < data.length; i++){
  207. result += '<li class="mui-table-view-cell mui-media"><a href="ybfwinfo.html?id='+data[i].id+'" >'+
  208. '<div class="mui-media-body">'+data[i].title+
  209. '<p class="mui-ellipsis">当前环节:'+data[i].status+' 拟稿日期:'+todata(data[i].fwdate)+'</p>'+
  210. '</div>'+
  211. '</a></li>';
  212. }
  213. $('.lists').html('');
  214. $('.lists').prepend(result);
  215. }})
  216. })
  217. $('.header .btn').on('click',function(){
  218. var $this = $(this);
  219. if(!!$this.hasClass('lock')){
  220. $this.attr('class','btn unlock');
  221. $this.text('解锁');
  222. // 锁定
  223. dropload.lock();
  224. }else{
  225. $this.attr('class','btn lock');
  226. $this.text('锁定');
  227. // 解锁
  228. dropload.unlock();
  229. }
  230. });
  231. // dropload
  232. var dropload = $('.inner').dropload({
  233. domUp : {
  234. domClass : 'dropload-up',
  235. domRefresh : '<div class="dropload-refresh">↓ 下拉刷新</div>',
  236. domUpdate : '<div class="dropload-update">↑ 释放更新</div>',
  237. domLoad : '<div class="dropload-load" ><img src="../images/zhuanquan.GIF" style="width:22px;height:22px;margin-right:10px" />加载中...</div>'
  238. },
  239. domDown : {
  240. domClass : 'dropload-down',
  241. domRefresh : '<div class="dropload-refresh">↑ 上拉加载更多</div>',
  242. domUpdate : '<div class="dropload-update">↓ 释放加载</div>',
  243. domLoad : '<div class="dropload-load" ><img src="../images/zhuanquan.GIF" style="width:22px;height:22px;margin-right:10px" />加载中...</div>'
  244. },
  245. loadUpFn : function(me){
  246. page = 1;
  247. rows = 10;
  248. $.ajax({
  249. type: 'post',
  250. url: '../../fwcontroller/ybfw.do',
  251. data:{uid:"402881e44e86c26d014e86c8062b0004",page:page,rows:rows,no:"",title:"",start:"",stop:""},
  252. dataType: 'json',
  253. success: function(data){
  254. var result = '';
  255. for(var i = 0; i < data.length; i++){
  256. result += '<li class="mui-table-view-cell mui-media"><a href="ybfwinfo.html?id='+data[i].id+'" >'+
  257. '<div class="mui-media-body">'+data[i].title+
  258. '<p class="mui-ellipsis">当前环节:'+data[i].status+' 拟稿日期:'+todata(data[i].fwdate)+'</p>'+
  259. '</div>'+
  260. '</a></li>';
  261. }
  262. $('.lists').html('');
  263. $('.lists').prepend(result);
  264. me.resetload();
  265. }})
  266. },
  267. loadDownFn : function(me){
  268. page+=1;
  269. $.ajax({
  270. type: 'post',
  271. url: '../../fwcontroller/ybfw.do',
  272. data:{uid:"402881e44e86c26d014e86c8062b0004",page:page,rows:rows,no:"",title:"",start:"",stop:""},
  273. dataType: 'json',
  274. success: function(data){
  275. if(data.length>0){
  276. var result = '';
  277. for(var i = 0; i < data.length; i++){
  278. result += '<li class="mui-table-view-cell mui-media"><a href="ybfwinfo.html?id='+data[i].id+'">'+
  279. '<div class="mui-media-body">'+data[i].title+
  280. '<p class="mui-ellipsis">当前环节:'+data[i].status+' 拟稿日期:'+todata(data[i].fwdate)+'</p>'+
  281. '</div>'+
  282. '</a></li>';
  283. }
  284. $('.lists').append(result);
  285. me.resetload();
  286. }else{
  287. alert("没有更多数据了")
  288. me.resetload();
  289. }
  290. }})
  291. }
  292. });
  293. </script>
  294. </body>
  295. </html>