123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport"
- content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
- <link rel="stylesheet" href="/static/dropload-gh-pages/dropload.css">
- <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
- <script type="text/javascript" src="/static/dropload-gh-pages/dropload.min.js"></script>
- <script type="text/javascript" src="/static/layer/layer.js"></script>
- <link rel="stylesheet" href="/static/h5/css/common.css">
- <title>列表</title>
- <style>
- body{
- background-color: #F1F1F1;
- }
- .container{
- max-width: 750px;
- height: auto;
- margin: 0 auto;
- padding: 0px 6px;
- }
- .patrol-lists{
- width: 100%;
- height: auto;
- margin-bottom: 30px;
- }
- .patrol-all{
- width: 100%;
- height: 170px;
- background-color: #FFFFFF;
- border-radius: 10px;
- margin: 5px 0px;
- padding: 0px 13px;
- }
- .patrol-title{
- width: 100%;
- height: 40px;
- line-height: 40px;
- }
- .patrol-title-left{
- width: 70%;
- height: 40px;
- display: inline-block;
- float: left;
- font-size: 15px;
- font-weight: 600;
- letter-spacing: 1px;
- color: var(--themeColor);
- overflow: hidden;
- }
- .patrol-title-right{
- float: right;
- font-size: 14px;
- /*font-weight: 600;*/
- }
- .patrol-content{
- width: 100%;
- height: 60px;
- }
- .patrol-start-time{
- width: 100%;
- height: 30px;
- line-height: 30px;
- border-bottom:1px solid #F1F1F1;
- overflow: hidden;
- }
- .left{
- font-size: 14px;
- float: left;
- }
- .right{
- font-size: 13px;
- color: #A9A9A9;
- float: right;
- }
- .patrol-end-time{
- width: 100%;
- height: 30px;
- line-height: 30px;
- border-bottom: 1px solid #F1F1F1;
- overflow: hidden;
- }
- .footer-back{
- position: fixed;
- z-index: 1000;
- width: 100%;
- height: 45px;
- line-height: 45px;
- background-color: #ffffff;
- bottom: 0;
- left: 0;
- box-shadow: 0px 0px 10px 0px rgba(26, 25, 26, 0.05);
- display: table-cell;
- vertical-align: middle;
- text-align: center;
- }
- .footer-back a img{
- width: 43px;
- height: 43px;
- }
- .nulldata{
- width: 100%;
- height: 200px;
- text-align: center;
- position: fixed;
- top: 22%;
- }
- .nulldata img{
- width: 200px;
- height: 160px;
- text-align: center;
- }
- .nulldata-text{
- margin-top: 15px;
- font-size: 14px;
- letter-spacing: 2px;
- text-align: center;
- }
- .patrol-dep{
- width: 100%;
- height: 30px;
- line-height: 30px;
- border-bottom: 1px solid #F1F1F1;
- }
- .patrol-user{
- width: 100%;
- height: 30px;
- line-height: 30px;
- overflow: hidden;
- }
- </style>
- </head>
- <body>
- {if $list}
- <div class="container">
- <div class="patrol-lists">
- {foreach $list as $k=>$v}
- <div class="patrol-all" onclick="patrolDetails(this)" data-id="{$v['id']}" data-orgId="{$v['org_id']}">
- <div class="patrol-title">
- <div class="patrol-title-left">{$v['title']}</div>
- {if $v['status'] == 0}
- <text class="patrol-title-right" style="color:orange;">未执行</text>
- {elseif($v['status'] == 1)}
- <text class="patrol-title-right" style="color:orange;">执行中</text>
- {elseif($v['status'] == 2)}
- <text class="patrol-title-right" style="color:green;">已完成</text>
- {elseif($v['status'] == 3)}
- <text class="patrol-title-right" style="color:gray;">未完成</text>
- {elseif($v['status'] == 5)}
- <text class="patrol-title-right" style="color:red;">中断</text>
- {elseif($v['status'] == 6)}
- <text class="patrol-title-right" style="color:red;">已关闭</text>
- {/if}
- </div>
- <div class="patrol-content">
- <div class="patrol-start-time">
- <text class="left">任务开始时间:</text>
- <text class="right">{$v['start_time']}</text>
- </div>
- <div class="patrol-end-time">
- <text class="left">任务结束时间:</text>
- <text class="right">{$v['end_time']}</text>
- </div>
- <div class="patrol-dep">
- <text class="left">执行人员部门:</text>
- <text class="right">{$v['dep']}</text>
- </div>
- <div class="patrol-user">
- <text class="left">执行人员名称:</text>
- <text class="right">{$v['real_name']}</text>
- </div>
- </div>
- </div>
- {/foreach}
- </div>
- </div>
- {else /}
- <div class="nulldata">
- <img src="/img/nulldata.png" alt="">
- <div class="nulldata-text">空空如也 ~</div>
- </div>
- {/if}
- <div class="footer-back">
- <a href="javascript:;" onclick="javascript:history.back(-1);"><img src="/img/back.png"></a>
- </div>
- </body>
- </html>
- <script>
- function patrolDetails(obj) {
- var obj = $(obj);
- var id = $(obj).attr('data-id');
- var orgId = $(obj).attr('data-orgId');
- var url = "{:url('Statistics/patrolDetails')}?id="+id+'&orgId='+orgId;
- window.location.href=url;
- }
- </script>
- <script>
- var type = '{$type}';
- var orgId = '{$orgId}';
- var day= '{$day}';
- var mode= '{$mode}';
- var count= '<?=count($list)?>';
- $(function(){
- // 页数
- var page = 1;
- // 每页展示20个
- var size = 20;
- // dropload
- $('.container').dropload({
- scrollArea : window,
- domDown : {
- domClass : 'dropload-down',
- domRefresh : '<div class="dropload-refresh">↑上拉加载更多</div>',
- domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
- domNoData : '<div class="dropload-noData"></div>'
- },
- loadDownFn : function(me){
- page++;
- // 拼接HTML
- var result = '';
- var url= "{:url('Statistics/patrolList')}";
- $.ajax({
- type: 'GET',
- url: url+'?page='+page+'&size='+size+'&type='+type+'&orgId='+orgId+'&day='+day+'&mode='+mode+'&dropload=1',
- dataType: 'json',
- success: function(res){
- var data = res.data;
- var arrLen = data.length;
- if(arrLen > 0){
- for(var i = 0; i < data.length; i++){
- if(arrLen > 0){
- result +='<div class="patrol-all" onclick="patrolDetails(this)" data-id="'+data[i].id+'" data-orgId="'+data[i].orgId+'">';
- result +='<div class="patrol-title">';
- result +='<div class="patrol-title-left">'+data[i].title+'</div>';
- if(data[i].status ==0){
- result +='<text class="patrol-title-right" style="color:orange;">未执行</text>';
- }
- if(data[i].status ==1){
- result +='<text class="patrol-title-right" style="color:orange;">执行中</text>';
- }
- if(data[i].status ==2){
- result +='<text class="patrol-title-right" style="color:green;">已完成</text>';
- }
- if(data[i].status ==3){
- result +='<text class="patrol-title-right" style="color:gray;">未完成</text>';
- }
- if(data[i].status ==5){
- result +='<text class="patrol-title-right" style="color:red;">中断</text>';
- }
- if(data[i].status ==6){
- result +='<text class="patrol-title-right" style="color:red;">已关闭</text>';
- }
- result +='</div>';
- result +='<div class="patrol-content">';
- result +='<div class="patrol-start-time">';
- result +='<text class="left">任务开始时间:</text>';
- result +='<text class="right">'+data[i].startTime+'</text>';
- result +='</div>';
- result +='<div class="patrol-end-time">';
- result +='<text class="left">任务结束时间:</text>';
- result +='<text class="right">'+data[i].endTime+'</text>';
- result +='</div>';
- result +='<div class="patrol-dep">';
- result +='<text class="left">执行人员部门:</text>';
- result +='<text class="right">'+data[i].dep+'</text>';
- result +='</div>';
- result +='<div class="patrol-user">';
- result +='<text class="left">执行人员名称:</text>';
- result +='<text class="right">'+data[i].realName+'</text>';
- result +='</div>';
- result +='</div>';
- result +='</div>';
- result +='</div>';
- }
- }
- // 如果没有数据
- }else{
- // 锁定
- me.lock();
- // 无数据
- me.noData();
- }
- //延迟1秒加载
- setTimeout(function(){
- // 插入数据到页面,放到最后面
- $('.patrol-lists').append(result);
- // 每次数据插入,必须重置
- me.resetload();
- },1000);
- },
- error: function(xhr, type){
- // 即使加载出错,也得重置
- me.resetload();
- }
- });
- },
- threshold : 50
- });
- });
- </script>
|