ZhouliProject/Zhouli.Bms/wwwroot/js/Areas/SystemManager/User/UserCtrl.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
require.config({
paths: {
}
});
require(["jquery", 'layui'], function ($) {
layui.use(['form', 'layer', 'table', 'laytpl'], function () {
var form = layui.form,
layer = parent.layer === undefined ? layui.layer : top.layer,
$ = layui.jquery,
laytpl = layui.laytpl,
table = layui.table;
//用户列表
var tableIns = table.render({
elem: '#userList',
url: '/System/User/GetUserList',
cellMinWidth: 95,
page: true,
height: "full-125",
limits: [10, 15, 20, 25],
limit: 20,
id: "userListTable",
done: function (res, curr, count) {
//如果是异步请求数据方式,res即为你接口返回的信息。
//如果是直接赋值的方式,res即为:{data: [], count: 99} data为当前页数据、count为数据总长度
//console.log(res);
},
cols: [[
{ type: "checkbox", fixed: "left", width: 50 },
{ field: 'UserName', title: '用户名', minWidth: 100, align: "center" },
{ field: 'UserNikeName', title: '用户昵称', align: 'center', minWidth: 150 },
{
field: 'UserEmail', title: '用户邮箱', minWidth: 200, align: 'center', templet: function (d) {
return '<a class="layui-blue" href="mailto:' + d.UserEmail + '">' + d.UserEmail + '</a>';
}
},
{
field: 'UserSex', title: '用户性别', align: 'center', width: 100, templet: function (d) {
return d.UserSex == "1" ? "男" : "女";
}
},
{
field: 'UserStatus', title: '用户状态', align: 'center', minWidth: 50, templet: function (d) {
return d.UserStatus == "1" ? "正常" : "停用";
}
},
{
field: 'CreateTime', title: '创建时间', align: 'center'
},
{ title: '操作', minWidth: 175, templet: '#userListBar', fixed: "right", align: "center" }
]]
});
//搜索【此功能需要后台配合,所以暂时没有动态效果演示】
$(".search_btn").on("click", function () {
table.reload("userListTable", {
page: {
curr: 1 //重新从第 1 页开始
},
where: {
searchstr: $(".searchVal").val() //搜索的关键字
}
后面还有 116 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。