WebRoot/res/js/studentList.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
layui.use(['form','layer','table','laytpl','upload'],function(){
var form = layui.form,
layer = parent.layer === undefined ? layui.layer : top.layer,
$ = layui.jquery,
upload = layui.upload,
table = layui.table;
//学生列表
var tableIns = table.render({
elem: '#studentList',
url : '/CMS/student/list.html',
request: {
pageName: 'curr' //页码的参数名称
,limitName: 'nums' //每页数据量的参数名
},
where: {
searchKey: $(".searchVal").val() //搜索的关键字
},
cellMinWidth : 95,
page : true,
height : "full-125",
limits : [10,15,20,25],
limit : 10,
loading : true,
id : "studentListTable",
cols : [[
{type: "checkbox", fixed:"left", width:50},
{field: 'id', title: '学号', sort:true, minWidth:150, align:"center"},
{field: 'name', title: '姓名',minWidth:120, align:'center'},
{field: 'sex', title: '性别', minWidth:60, align:'center'},
{field: 'admissionDate', title: '入学时间', minWidth:150, align:'center'},
{field: 'major', title: '专业', minWidth:150, align:'center'},
{field: 'grade', title: '班级', minWidth:150, align:'center'},
{field: 'education', title: '学历层次', minWidth:120, align:'center'},
{title: '操作', width:200, templet:'#studentListBar',fixed:"right",align:"center"}
]]
});
//搜索
$(".search_btn").on("click",function(){
if($(".searchVal").val() != ''){
tableIns.reload({
page: {
curr: 1 //重新从第 1 页开始
},
where: {
searchKey: $(".searchVal").val() //搜索的关键字
}
});
}else{
layer.msg("请输入搜索的内容");
}
});
//编辑or添加用户
function addUser(edit){
var title = "添加学生";
if (edit) title = "编辑学生信息";
//console.log(edit);
后面还有 153 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。