received.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. {extend name="public/layout" /} {block name="title"}日报{/block} {block name="body"}
  2. <link rel="stylesheet" type="text/css" href="__STATIC__/css/csspc.css"/>
  3. <link rel="stylesheet" type="text/css" href="__STATIC__/css/redesign.css"/>
  4. <style type="text/css">
  5. html,
  6. body {
  7. display: block;
  8. min-width: 1100px;
  9. width: 100%;
  10. height: 100%;
  11. overflow: hidden;
  12. }
  13. body{
  14. padding: 15px;
  15. box-sizing: border-box;
  16. }
  17. .layui-fluid {
  18. max-height: 100%;
  19. display: block;
  20. box-shadow: 0 0 4px 0 #B6CADE;
  21. border-radius: 5px;
  22. margin: 0;
  23. background-color: #ffffff;
  24. overflow: hidden;
  25. padding: 0;
  26. box-sizing: border-box;
  27. position: relative;
  28. }
  29. .layui-tab {
  30. padding: 28px 24px 0px 30px;
  31. position: absolute;
  32. top: 0;
  33. left: 0;
  34. width: 100%;
  35. margin: 0;
  36. height: auto;
  37. background-color: #ffffff;
  38. z-index: 10;
  39. font-size: 16px;
  40. line-height: 16px;
  41. }
  42. .layui-tab-title{
  43. display: block;
  44. border-color:#eee;
  45. padding-bottom: 5px;
  46. height: auto;
  47. }
  48. .layui-tab-title li{
  49. font-size: 16px;
  50. position: relative;
  51. line-height: 16px;
  52. padding: 0;
  53. margin-left: 30px;
  54. min-width: auto;
  55. padding-bottom: 0;
  56. }
  57. .layui-tab-title li:first-child{
  58. margin-left: 0;
  59. }
  60. .layui-tab-title .layui-this:after{
  61. border-width: 0;
  62. }
  63. .layui-tab-title .layui-this{
  64. color: #41abfc;
  65. position: relative;
  66. padding-bottom: 11px;
  67. }
  68. .layui-tab-title li a{
  69. display: block;
  70. width: 100%;
  71. height: 100%;
  72. padding-bottom: 11px;
  73. position: relative;
  74. }
  75. .layui-tab-title .layui-this::before{
  76. content: ' ';
  77. display: block;
  78. width: 100%;
  79. height: 3px;
  80. background-color: #249efb;
  81. position: absolute;
  82. left: 0;
  83. bottom: 4px;
  84. }
  85. .layui-card-body{
  86. display: block;
  87. width: 100%;
  88. height: 100%;
  89. padding: 0;
  90. padding-top: 61px;
  91. }
  92. #LAY_demo1{
  93. display: block;
  94. width: 100%;
  95. height: 100%;
  96. overflow: auto;
  97. padding: 0 24px 0 30px;
  98. }
  99. p.daytext{
  100. padding-bottom: 8px;
  101. border-bottom: 1px solid #eee;
  102. }
  103. #LAY_demo1 ul{
  104. padding: 0 20px;
  105. }
  106. .readeddiv{
  107. display: none;
  108. }
  109. /*webkit内核*/
  110. .scroll_content::-webkit-scrollbar {
  111. width:0px;
  112. height:0px;
  113. }
  114. .scroll_content::-webkit-scrollbar-button {
  115. background-color:rgba(0,0,0,0);
  116. }
  117. .scroll_content::-webkit-scrollbar-track {
  118. background-color:rgba(0,0,0,0);
  119. }
  120. .scroll_content::-webkit-scrollbar-track-piece {
  121. background-color:rgba(0,0,0,0);
  122. }
  123. /* 滚动条 */
  124. .scroll_content::-webkit-scrollbar-thumb{
  125. background-color:#aaa;
  126. border-radius: 3px;
  127. }
  128. .scroll_content::-webkit-scrollbar-corner {
  129. background-color:rgba(0,0,0,0);
  130. }
  131. .scroll_content::-webkit-scrollbar-resizer {
  132. background-color:rgba(0,0,0,0);
  133. }
  134. .scroll_content::-webkit-scrollbar {
  135. width:7px;
  136. border-radius: 3px;
  137. }
  138. /*o内核*/
  139. .scroll_content::-o-scrollbar{
  140. -moz-appearance: none !important;
  141. background: rgba(0,255,0,0) !important;
  142. }
  143. .scroll_content::-o-scrollbar-button {
  144. background-color:rgba(0,0,0,0);
  145. }
  146. .scroll_content::-o-scrollbar-track {
  147. background-color:rgba(0,0,0,0);
  148. }
  149. .scroll_content::-o-scrollbar-track-piece {
  150. background-color:rgba(0,0,0,0);
  151. }
  152. /* 滚动条 */
  153. .scroll_content::-o-scrollbar-thumb{
  154. background-color:#aaa;
  155. border-radius: 3px;
  156. }
  157. .scroll_content::-o-scrollbar-corner {
  158. background-color:rgba(0,0,0,0);
  159. }
  160. .scroll_content::-o-scrollbar-resizer {
  161. background-color:rgba(0,0,0,0);
  162. }
  163. /*IE10,IE11,IE12*/
  164. .scroll_content{
  165. -ms-scroll-chaining: chained;
  166. -ms-overflow-style: none;
  167. -ms-content-zooming: zoom;
  168. -ms-scroll-rails: none;
  169. -ms-content-zoom-limit-min: 100%;
  170. -ms-content-zoom-limit-max: 500%;
  171. -ms-scroll-snap-type: proximity;
  172. -ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
  173. -ms-overflow-style: none;
  174. overflow: auto;
  175. }
  176. </style>
  177. <body>
  178. <div class="layui-fluid">
  179. <div class="layui-tab">
  180. <ul class="layui-tab-title">
  181. <li style="padding-bottom: 0;">
  182. <a href="{:url('dailyWork/work')}">汇报</a>
  183. </li>
  184. <li style="padding-bottom: 0;">
  185. <a href="{:url('dailyWork/sent')}">我发送的</a>
  186. </li>
  187. <li class="layui-this" style="padding-bottom: 11px;">
  188. 我收到的
  189. </li>
  190. </ul>
  191. </div>
  192. <div class="layui-card-body">
  193. <ul class="flow-default scroll_content" id="LAY_demo1"></ul>
  194. </div>
  195. </div>
  196. </body>
  197. {/block} {block name="js"}
  198. <script>
  199. layui.config({
  200. base: '__LAYUI__/',
  201. urlbase: '/sys'
  202. }).extend({
  203. index: 'lib/index' //主入口模块
  204. }).use(['index', 'table', 'flow'], function() {
  205. var $ = layui.$,
  206. flow = layui.flow,
  207. form = layui.form;
  208. flow.load({
  209. elem: '#LAY_demo1',
  210. scrollElem: '#LAY_demo1',
  211. done: function(page, next) { //执行下一页的回调
  212. //模拟数据插入
  213. setTimeout(function() {
  214. var lis = [];
  215. var count = 0;
  216. $.ajax({
  217. type:"get",
  218. url:"{:url('dailyWork/list')}?page="+page+"&option=received",
  219. async:true,
  220. success:function(rs){
  221. var listhtml='';
  222. for( var i in rs.data)
  223. {
  224. listhtml+='<dd>';
  225. listhtml+='<p class="font24 daytext mdt26 huise333">'+i+'</p>';
  226. listhtml+='<ul class="mdt11">';
  227. for(var j = 0;j<rs.data[i].length;j++ ){
  228. listhtml+='<li data-id="'+rs.data[i][j].id+'" class="wpsr mdt15 everydailybox">';
  229. listhtml+='<div class="width80_"><div class="woverflow">';
  230. if(rs.data[i][j].view)
  231. {
  232. listhtml+='<div class="wleft mdt04 mdr10 readeddiv "></div>';
  233. }else{
  234. listhtml+='<div class="wleft mdt04 mdr10 unread_ts"></div>';
  235. }
  236. listhtml+='<p class="wleft font18 textb huise333">'+rs.data[i][j].name+'</p></div>';
  237. if(rs.data[i][j].type == 'day')
  238. {
  239. listhtml+='<p class="font16 mdt03 huise666 lh24 ">今日工作计划:'+rs.data[i][j].current_work+'</p>';
  240. listhtml+='<p class="font16 mdt08 huise666 lh24 ">明日工作计划:'+rs.data[i][j].next_plan+'</p>';
  241. }else if(rs.data[i][j].type == 'week'){
  242. listhtml+='<p class="font16 mdt03 huise666 lh24 ">本周工作计划:'+rs.data[i][j].current_work+'</p>';
  243. listhtml+='<p class="font16 mdt08 huise666 lh24 ">下周工作计划:'+rs.data[i][j].next_plan+'</p>';
  244. }else{
  245. listhtml+='<p class="font16 mdt03 huise666 lh24 ">本月工作计划:'+rs.data[i][j].current_work+'</p>';
  246. listhtml+='<p class="font16 mdt08 huise666 lh24 ">下月工作计划:'+rs.data[i][j].next_plan+'</p>';
  247. }
  248. listhtml+='</div><p class="wpsa layui-send-tiem huiseaaa font16">'+ rs.data[i][j].addtime.split(' ')[1]+'</p>';
  249. listhtml+='</li>';
  250. }
  251. listhtml+='</ul>';
  252. listhtml+='</dd>';
  253. }
  254. lis.push(listhtml);
  255. next(lis.join(''), page < rs.page); //假设总页数为 10
  256. opendaily();
  257. $("#LAY_demo1").height($('.layui-fluid').height() - 61)
  258. }
  259. });
  260. //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
  261. //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
  262. }, 500);
  263. }
  264. });
  265. function opendaily() {
  266. $('.everydailybox').click(function () {
  267. var id = $(this).data('id');
  268. layer.open({
  269. type: 2,
  270. title: false,
  271. content: '{:url("dailyWork/details")}?category=received&id='+id,
  272. maxmin: true,
  273. area: ['50%', '80%'],
  274. });
  275. })
  276. }
  277. });
  278. </script>
  279. {/block}