123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- {extend name="public/layout" /} {block name="title"}日报{/block} {block name="body"}
- <link rel="stylesheet" type="text/css" href="__STATIC__/css/csspc.css"/>
- <link rel="stylesheet" type="text/css" href="__STATIC__/css/redesign.css"/>
- <style type="text/css">
- html,
- body {
- display: block;
- min-width: 1100px;
- width: 100%;
- height: 100%;
- overflow: hidden;
-
- }
- body{
- padding: 15px;
- box-sizing: border-box;
- }
- .layui-fluid {
- max-height: 100%;
- display: block;
- box-shadow: 0 0 4px 0 #B6CADE;
- border-radius: 5px;
- margin: 0;
- background-color: #ffffff;
- overflow: hidden;
- padding: 0;
- box-sizing: border-box;
- position: relative;
- }
-
- .layui-tab {
- padding: 28px 24px 0px 30px;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- margin: 0;
- height: auto;
- background-color: #ffffff;
- z-index: 10;
- font-size: 16px;
- line-height: 16px;
- }
- .layui-tab-title{
- display: block;
- border-color:#eee;
- padding-bottom: 5px;
- height: auto;
- }
- .layui-tab-title li{
- font-size: 16px;
- position: relative;
- line-height: 16px;
- padding: 0;
- margin-left: 30px;
- min-width: auto;
- padding-bottom: 0;
- }
- .layui-tab-title li:first-child{
- margin-left: 0;
- }
- .layui-tab-title .layui-this:after{
- border-width: 0;
- }
- .layui-tab-title .layui-this{
- color: #41abfc;
- position: relative;
- padding-bottom: 11px;
- }
-
- .layui-tab-title li a{
- display: block;
- width: 100%;
- height: 100%;
- padding-bottom: 11px;
- position: relative;
- }
- .layui-tab-title .layui-this::before{
- content: ' ';
- display: block;
- width: 100%;
- height: 3px;
- background-color: #249efb;
- position: absolute;
- left: 0;
- bottom: 4px;
- }
- .layui-card-body{
- display: block;
- width: 100%;
- height: 100%;
- padding: 0;
- padding-top: 61px;
- }
- #LAY_demo1{
- display: block;
- width: 100%;
- height: 100%;
- overflow: auto;
- padding: 0 24px 0 30px;
- }
- p.daytext{
- padding-bottom: 8px;
- border-bottom: 1px solid #eee;
- }
- #LAY_demo1 ul{
- padding: 0 20px;
- }
- /*webkit内核*/
- .scroll_content::-webkit-scrollbar {
- width:0px;
- height:0px;
- }
- .scroll_content::-webkit-scrollbar-button {
- background-color:rgba(0,0,0,0);
- }
- .scroll_content::-webkit-scrollbar-track {
- background-color:rgba(0,0,0,0);
- }
- .scroll_content::-webkit-scrollbar-track-piece {
- background-color:rgba(0,0,0,0);
- }
- /* 滚动条 */
- .scroll_content::-webkit-scrollbar-thumb{
- background-color:#aaa;
- border-radius: 3px;
- }
- .scroll_content::-webkit-scrollbar-corner {
- background-color:rgba(0,0,0,0);
- }
- .scroll_content::-webkit-scrollbar-resizer {
- background-color:rgba(0,0,0,0);
- }
- .scroll_content::-webkit-scrollbar {
- width:7px;
- border-radius: 3px;
- }
- /*o内核*/
- .scroll_content::-o-scrollbar{
- -moz-appearance: none !important;
- background: rgba(0,255,0,0) !important;
- }
- .scroll_content::-o-scrollbar-button {
- background-color:rgba(0,0,0,0);
- }
- .scroll_content::-o-scrollbar-track {
- background-color:rgba(0,0,0,0);
- }
- .scroll_content::-o-scrollbar-track-piece {
- background-color:rgba(0,0,0,0);
- }
- /* 滚动条 */
- .scroll_content::-o-scrollbar-thumb{
- background-color:#aaa;
- border-radius: 3px;
- }
- .scroll_content::-o-scrollbar-corner {
- background-color:rgba(0,0,0,0);
- }
- .scroll_content::-o-scrollbar-resizer {
- background-color:rgba(0,0,0,0);
- }
- /*IE10,IE11,IE12*/
- .scroll_content{
- -ms-scroll-chaining: chained;
- -ms-overflow-style: none;
- -ms-content-zooming: zoom;
- -ms-scroll-rails: none;
- -ms-content-zoom-limit-min: 100%;
- -ms-content-zoom-limit-max: 500%;
- -ms-scroll-snap-type: proximity;
- -ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
- -ms-overflow-style: none;
- overflow: auto;
- }
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-tab">
- <ul class="layui-tab-title">
- <li style="padding-bottom: 0;">
- <a href="{:url('dailyWork/work')}">汇报</a>
- </li>
- <li class="layui-this" style="padding-bottom: 11px;">
- 我发送的
- </li>
- <li style="padding-bottom: 0;">
- <a href="{:url('dailyWork/received')}">我收到的</a>
- </li>
- </ul>
- </div>
- <div class="layui-card-body">
- <ul class="flow-default scroll_content" id="LAY_demo1" ></ul>
- </div>
-
- </div>
- </body>
- {/block} {block name="js"}
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'table', 'flow'], function() {
- var $ = layui.$,
- flow = layui.flow,
- form = layui.form;
-
- flow.load({
- elem: '#LAY_demo1',
- scrollElem: '#LAY_demo1',
- done: function(page, next) { //执行下一页的回调
- //模拟数据插入
- setTimeout(function() {
- var lis = [];
- var count = 0;
- $.ajax({
- type:"get",
- url:"{:url('dailyWork/list')}?page="+page+"&option=sent",
- async:true,
- success:function(rs){
- var listhtml='';
-
- for( var i in rs.data)
- {
-
- listhtml+='<dd>';
- listhtml+='<p class="daytext font24 mdt26 huise333">'+i+'</p>';
- listhtml+='<ul class="mdt11 ">';
- for(var j = 0;j<rs.data[i].length;j++ ){
- listhtml+='<li data-id="'+rs.data[i][j].id+'" class="wpsr mdt15 everydailybox">';
- listhtml+='<div class="width80_"><div class="woverflow">';
- listhtml+='<p class="wleft font18 textb huise333">'+rs.data[i][j].name+'</p></div>';
- if(rs.data[i][j].type == 'day')
- {
- listhtml+='<p class="font16 mdt03 huise666 lh24 ">今日工作计划:'+rs.data[i][j].current_work+'</p>';
- listhtml+='<p class="font16 mdt08 huise666 lh24 ">明日工作计划:'+rs.data[i][j].next_plan+'</p>';
- }else if(rs.data[i][j].type == 'week'){
- listhtml+='<p class="font16 mdt03 huise666 lh24 ">本周工作计划:'+rs.data[i][j].current_work+'</p>';
- listhtml+='<p class="font16 mdt08 huise666 lh24 ">下周工作计划:'+rs.data[i][j].next_plan+'</p>';
- }else{
- listhtml+='<p class="font16 mdt03 huise666 lh24 ">本月工作计划:'+rs.data[i][j].current_work+'</p>';
- listhtml+='<p class="font16 mdt08 huise666 lh24 ">下月工作计划:'+rs.data[i][j].next_plan+'</p>';
- }
-
- listhtml+='</div><p class="wpsa layui-send-tiem huiseaaa font16">'+ rs.data[i][j].addtime.split(' ')[1]+'</p>';
- listhtml+='</li>';
- }
- listhtml+='</ul>';
- listhtml+='</dd>';
- }
-
- lis.push(listhtml);
- next(lis.join(''), page < rs.page); //假设总页数为 10
- opendaily();
- $("#LAY_demo1").height($('.layui-fluid').height()-61)
- }
- });
- //执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
- //pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
-
- }, 500);
- }
- });
- function opendaily(){
- $('.everydailybox').click(function(){
- var id = $(this).data('id');
- layer.open({
- type: 2,
- title: false,
- content: '{:url("dailyWork/details")}?category=sent&id='+id,
- maxmin: true,
- area: ['50%', '80%'],
- });
- })
- }
- });
- </script>
- {/block}
|