1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3">
- <!-- <a href="{:url('add')}" class="btn btn-sm btn-primary">新增</a>-->
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('userWork')}">
- <div class="input-group">
- <input type="text" class="form-control" name="title" placeholder="用户名称">
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-primary " type="button" id="search-clear"><i class="fa fa-undo"></i></button>
- </span>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="ibox-content">
- <div class="jqGrid_wrapper">
- <table id="table" style="border-collapse: collapse"></table>
- <div id="pager"></div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script>
- $(function () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('userWork')}",
- datatype: "json",
- colModel:[
- {label:'用户名称',name:'nickname',index:'nickname',width:80,editable: false,sortable: false},
- {label:'本月(时长秒)',name:'month',index:'month',width:80,editable: false,sortable: false},
- {label:'本周(时长秒)',name:'week',index:'week',width:80,editable: false,sortable: false},
- {label:'今天(时长秒)',name:'day',index:'day',width:80,editable: false,sortable: false},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"{$meta_title}",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|