12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-12" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('index')}">
- <div class="input-group">
- <input type="text" class="form-control" name="uname" placeholder="用户">
- </div>
- <div class="input-group">
- <input type="text" class="form-control" name="title" placeholder="事件名称">
- </div>
- <div class="input-group">
- <select name="status" class="form-control">
- <option value="">选择状态</option>
- <option value="1">任务开始</option>
- <option value="2">任务完成</option>
- <option value="3">任务超时</option>
- </select>
- </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-warning" 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('record')}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'id',index:'id', width:30,sortable: false},
- {label:'用户',name:'real_name',index:'real_name', width:50,sortable: false},
- {label:'事件名称',name:'title',index:'title',width:150,editable: false,sortable: false},
- {label:'状态',name:'status',index:'status',width:40,editable: false,sortable: false,formatter:function (a,b,c){
- if(a == 1){
- return '<span class="label label-primary" title="进行中">进行中</span>';
- } else if(a == 2){
- return '<span class="label label-success" title="已完成">已完成</span>';
- }else{
- return '<span class="label label-danger" title="已完成">已完成</span>';
- }
- }},
- {label:'创建日期',name:'create_time',index:'create_time',width:60,editable: false,sortable: false},
- {label:'操作',width:50,sortable: false,formatter: function (a, b, c) {
- var editurl = "{:url('Bursting/detail',[],'')}/id/"+c.id;
- var btn = '<a url="'+editurl+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a>';
- return btn;
- }},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"应急突发事件保障记录",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|