1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- {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>
- {/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('article_log',['id'=>$id])}",
- datatype: "json",
- colModel:[
- {label:'ID',name:'id',index:'id', width:30,sortable: false},
- {label:'试卷名称',name:'article_paper_name',index:'article_paper_name',width:80,editable: false,sortable: false},
- {label:'考生',name:'user_name',index:'user_name',width:60,sortable: true},
- {label:'得分',name:'score',index:'score',width:60,sortable: true},
- {label:'交卷时间',name:'create_time',index:'create_time',width:60,sortable: true},
- {label:'操作',width:50,sortable: false,formatter: function (a, b, c) {
- var info_url = "{:url('log_info',[],'')}/id/"+c.id;
- var del_url = "{:url('del_question',[],'')}/id/"+c.id;
- var btn = '<a url="'+info_url+'" href="javascript:;" data-title="作答详情" onclick="layer_open(this,1)"><span class="label label-primary" title="作答详情">作答详情</span></a> ';
- // btn += '<a href="'+del_url+'" class="confirm ajax-get" data-confirm="确定要删除此记录吗?" data-table="1"><span class="label label-danger" 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: "asc",
- caption:"{$m_name}",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|