123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <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('workList1')}?user_id={$user_id}&is_normal={$is_normal}&type={$type}&start={$start}&end={$end}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'id',index:'id', width:30,sortable: false},
- {label:'执行人',name:'task_user',index:'task_user', width:40,sortable: false},
- {label:'计划名称',name:'title',index:'title', width:80,sortable: false},
- {label:'开始时间',name:'start_time',index:'start_time', width:100,sortable: false},
- {label:'结束时间',name:'end_time',index:'end_time', width:100,sortable: false},
- {label:'状态',name:'status',status:'status',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- if(a == 0){
- return '<span>未执行</span>';
- }
- if(a == 1){
- return '<span>执行中</span>';
- }
- if(a == 2){
- return '<span>已完成</span>';
- }
- if(a == 3){
- return '<span>未完成</span>';
- }
- if(a == 5){
- return '<span>中断</span>';
- }
- if(a == 6){
- return '<span>已关闭</span>';
- }
- }},
- ],
- 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}
|