123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox-content">
- <div class="ibox">
- <div class="alert">
- <form action="{:url('PatrolStatistics/patrol')}" method="GET" id='search_form' class="form-inline">
- <input type="hidden" name="type" value="{$type}">
- <div class="input-group" style="width: 200px">
- <span class="input-group-addon">开始时间</span>
- <input class="form-control dialog-datetime" id="startTime" name="start" type="text" data-date-format="yyyy-mm-dd" value="{$start}" placeholder="" readonly/>
- </div>
- <div class="input-group" style="width: 200px">
- <span class="input-group-addon">结束时间</span>
- <input class="form-control dialog-datetime" id="endTime" name="end" type="text" data-date-format="yyyy-mm-dd" value="{$end}" placeholder="" readonly/>
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="submit" ><i class="fa fa-search"></i></button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-warning" type="reset" onclick="empty_search()"><i class="fa fa-undo"></i></button>
- </span>
- </div>
- </form>
- </div>
- <div class="panel-group">
- <div class="panel panel-default">
- <div class="panel-heading clearfix">
- <div class="btn-group pull-left">
- {if $type==1}巡更{/if}{if $type==2}巡检{/if}{if $type==3}巡视{/if}{if $type==4}巡查{/if} 工作量统计分析
- </div>
- <div class="btn-group pull-right">
- <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i>打印</a>
- <a href="javascript:;" onclick="exportExcel()" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-download"></i>导出</a>
- </div>
- </div>
- <div class="panel-body" id="printer">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>智慧点</th>
- <th>总数</th>
- <th>总数(异常)</th>
- </tr>
- </thead>
- <tbody>
- {foreach $list as $k=>$v}
- <tr>
- <td>{$v['title']}</td>
- <td>
- {if $v['count'] >0}
- <a href="javascript:;" onclick="layer_open(this,0)" url="{:url('patrolList')}?patrol_addr_id={$v['patrol_addr_id']}&is_normal=0&type={$type}&start={$start}&end={$end}">{$v['count']}</a>
- {else}
- {$v['count']}
- {/if}
- </td>
- <td>
- {if $v['normal'] >0}
- <a href="javascript:;" onclick="layer_open(this,0)" url="{:url('patrolList')}?patrol_addr_id={$v['patrol_addr_id']}&is_normal=1&type={$type}&start={$start}&end={$end}">{$v['normal']}</a>
- {else}
- {$v['normal']}
- {/if}
- </td>
- </tr>
- {/foreach}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script src="/static/browser.js"></script>
- <script src="/static/jquery.jqprint-0.3.js"></script>
- <script>
- $(function () {
- laydate.render({
- elem: '#startTime',
- trigger: 'click',
- theme: '#148d8f'
- });
- laydate.render({
- elem: '#endTime',
- trigger: 'click',
- theme: '#148d8f'
- });
- });
- function empty_search(){
- window.location.href = "{:url('PatrolStatistics/patrol')}?type={$type}";
- }
- function printer(){
- $('#printer').jqprint();
- }
- function exportExcel() {
- var start = $('#startTime').val().trim();
- var end = $('#endTime').val().trim();
- if (start && !end) {
- window.location.href = "{:url('PatrolStatistics/patrolExport')}?type={$type}&start="+start;
- }else if (!start && end) {
- window.location.href = "{:url('PatrolStatistics/patrolExport')}?type={$type}&end="+end;
- }else if (start && end) {
- window.location.href = "{:url('PatrolStatistics/patrolExport')}?type={$type}&start=" + start + "&end=" + end;
- }else{
- window.location.href = "{:url('PatrolStatistics/patrolExport')}?type={$type}"
- }
- }
- </script>
- {/block}
|