123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3">
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <a href="{:url('index')}" class="btn btn-sm btn-primary">返回上一页</a>
- </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>
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- {/block}
- {block name="script"}
- <script>
- $(function () {
- // laydate.render({
- // elem: '#date',
- // //设置开始日期、日期日期的 input 选择器
- // //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- // trigger: 'click' ,
- // theme: '#284a94'
- // });
- // laydate.render({
- // elem: '#date1',
- // //设置开始日期、日期日期的 input 选择器
- // //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- // trigger: 'click' ,
- // theme: '#284a94'
- // });
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('workLog',['id'=>$id])}",
- datatype: "json",
- colModel:[
- {label:'文档名称',name:'title',index:'title',width:100,editable: false,sortable: false},
- {label:'最低时长限制',name:'limit',index:'limit',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- if(a>0){
- return a+'分钟';
- } else{
- return '不限制';
- }
- }},
- {label:'实际学习时长',name:'times',index:'times',width:50,sortable: true},
- {label:'达标状态',name:'status',index:'status',width:40,sortable: true},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "asc",
- caption:"{$m_name}",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|