WebRoot/res/js/teacherList.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
layui.use(['form','layer','table','laytpl','upload'],function(){
var form = layui.form,
layer = parent.layer === undefined ? layui.layer : top.layer,
$ = layui.jquery,
laytpl = layui.laytpl,
upload = layui.upload,
table = layui.table;
//列表
var tableIns = table.render({
elem: '#teacherList',
url : '../teacher/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 : "teacherListTable",
cols : [[
{type: "checkbox", fixed:"left", width:50},
{field: 'id', title: '教职工号', sort:true, width:150, align:"center"},
{field: 'name', title: '姓名', width:150, align:'center'},
{field: 'synopsis', title: '简介', align:'center'},
{title: '操作', width:220, templet:'#teacherListBar',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("请输入搜索的内容");
}
});
//添加用户
function addUser(edit){
var title = "添加教师";
if (edit) title = "编辑教师信息";
var index = layui.layer.open({
title : title,
type : 2,
content : "../teacher/addPage.html",
success : function(layero, index){
后面还有 144 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。