able.render({
elem: '#stuscore',
url:'${pageContext.request.contextPath }/getStudentScoreAndPeosonInfoAndCourseInfoController/getStudentScoreAndPeosonInfoAndCourseInfo',
toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
,
defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
title: '学生成绩信息',
layEvent: 'LAYTABLE_TIPS',
icon: 'layui-icon-tips'
}],
title: '学生成绩信息',
initSort: {
field: 'sid' //排序字段,对应 cols 设定的各字段名
,type: 'desc' //排序方式 asc: 升序、desc: 降序、null: 默认排序
},
skin:'row',
even:true,
cols: [
[{
type: 'checkbox',
fixed: 'left'
}, {
field: 'sid',
title: '序号',
width: 65,
fixed: 'left',
sort: true,
/*unresize: true,*/
templet:function(data){return data.student.sid;},
}, {
field: 'snum',
title: '学生学号',
width: 100,
templet:function(data){return data.student.snum;}
}, {
field: 'sname',
title: '学生姓名',
width: 90,
edit: 'text',
templet:function(data){return data.student.sname;}
},{
field: 'scollage',
title: '所在学院',
templet:function(data){return data.student.scollage;}
}, {
field: 'sdepartment',
title: '所在院系',
width: 100,
templet:function(data){return data.student.sdepartment;}
}, {
field: 'sclass',
title: '所在班级',
width: 80,
templet:function(data){return data.student.sclass;}
},{
field: 'cnum',
title: '课程编号',
width: 86,
edit: 'text',
templet:function(data){return data.courseInfo.cnum;}
}, {
field: 'cname',
title: '课程名称',
width: 86,
edit: 'text',
templet:function(data){return data.courseInfo.cname;}
}, {
field: 'ccount',
title: '学分',
templet:function(data){return data.courseInfo.ccount;}
},{
field: 'ctotaltime',
title: '学时',
width: 60,
templet:function(data){return data.courseInfo.ctotaltime;}
},{
field: 'courseStyle',
title: '课程属性',
width: 86,
templet:function(data){return data.courseInfo.courseStyle;}
},{
field: 'ctime',
title: '开课学期',
width: 85,
templet:function(data){return data.courseInfo.ctime;}
},{
field: 'sexamscore',
title: '成绩',
width: 58
},{
field: 'reexam',
title: '补考学期',
width: 60
}, {
field: 'sexamstyle',
title: '考核方式',
width: 86,
},{
field: 'steacher',
title: '上传成绩教师',
width: 90
},{
filed:'operation',
toolbar: '#barDemo',
title:'操作',
width:95
}]
],
page: true,
limit:8,
limits:[8,10,15,20,30,50,100],//可选择每页显示的数量
response: {
statusName: 'code' //数据状态的字段名称,默认:code
,statusCode: 0 //成功的状态码,默认:0
,msgName: '' //状态信息的字段名称,默认:msg
,countName: 'count' //数据总数的字段名称,默认:count
,dataName: 'data' //数据列表的字段名称,默认:data
},
where:{tname :document.getElementById("tname").value,}