src/Czar.Cms.Admin/wwwroot/js/role/roleList.js
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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: '#roleList',
url: '/ManagerRole/LoadData/',
cellMinWidth: 95,
page: true,
height: "full-125",
limits: [10, 15, 20, 25],
limit: 10,
id: "roleListTable",
cols: [[
{ type: "checkbox", fixed: "left", width: 50 },
{ field: "Id", title: 'Id', width: 50, align: "center" },
{ field: 'RoleName', title: '角色名称', minWidth: 100, align: "center" },
{
field: 'RoleType', title: '角色类型', minWidth: 150, align: 'center', templet: function (d) {
if (d.RoleType === 1) {
return "超级管理员";
} else if (d.RoleType === 2) {
return "系统管理员";
} else {
return "未知";
}
}
},
{
field: 'IsSystem', title: '系统默认', minWidth: 100, align: 'center', templet: function (d) {
return d.IsSystem === true ? "是" : "否";
}
},
{ field: 'Remark', title: '备注', align: 'center' },
{ field: 'AddTime', title: '添加时间', align: 'center', minWidth: 150 },
{ title: '操作', minWidth: 175, templet: '#roleListBar', fixed: "right", align: "center" }
]]
});
//搜索【此功能需要后台配合,所以暂时没有动态效果演示】
$(".search_btn").on("click", function () {
if ($(".searchVal").val() !== '') {
table.reload("roleListTable", {
page: {
curr: 1 //重新从第 1 页开始
},
where: {
key: $(".searchVal").val() //搜索的关键字
}
});
} else {
layer.msg("请输入搜索的内容");
}
});
//添加用户
后面还有 91 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
