src/main/resources/public/js/user/user.js
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
layui.use(['table','layer',"form"],function(){
var layer = parent.layer === undefined ? layui.layer : top.layer,
$ = layui.jquery,
table = layui.table;
//用户列表展示
var tableIns = table.render({
elem: '#userList',
url : ctx+'/user/list',
cellMinWidth : 95,
page : true,
height : "full-125",
limits : [10,15,20,25],
limit : 10,
toolbar: "#toolbarDemo",
id : "userListTable",
cols : [[
{type: "checkbox", fixed:"left", width:50},
{field: "id", title:'编号',fixed:"true", width:80},
{field: 'userName', title: '用户名', minWidth:50, align:"center"},
{field: 'email', title: '用户邮箱', minWidth:100, align:'center'},
{field: 'phone', title: '手机号', minWidth:100, align:'center'},
{field: 'trueName', title: '真实姓名', align:'center'},
{field: 'createDate', title: '创建时间', align:'center',minWidth:150},
{field: 'updateDate', title: '更新时间', align:'center',minWidth:150},
/* 行工具栏 */
{title: '操作', minWidth:150, templet:'#userListBar',fixed:"right",align:"center"}
]]
});
// 多条件搜索
$(".search_btn").on("click",function () {
table.reload("userListTable",{
page:{
curr:1
},
where:{
userName:$("input[name='userName']").val(),// 用户名
email:$("input[name='email']").val(),// 邮箱
phone:$("input[name='phone']").val() //手机号
}
})
});
// 头工具栏事件
table.on('toolbar(users)',function (obj) {
switch (obj.event) {
case "add": // 添加用户
openAddOrUpdateUserDialog();
break;
case "del": // 删除多条记录
delUser(table.checkStatus(obj.config.id).data);
break;
}
});
// 删除多条记录
后面还有 96 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。