ZhouliProject/Zhouli.Bms/wwwroot/js/Areas/SystemManager/UserGroup/UserGroupCtrl.js

(开头部分) 5KB

这里只显示每个文件的开头 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: '#userGroupList',
            url: '/System/UserGroup/GetUserGroupList',
            cellMinWidth: 95,
            page: true,
            height: "full-125",
            limits: [10, 15, 20, 25],
            limit: 20,
            id: "userGroupListTable",
            done: function (res, curr, count) {
                //如果是异步请求数据方式,res即为你接口返回的信息。
                //如果是直接赋值的方式,res即为:{data: [], count: 99} data为当前页数据、count为数据总长度
                //console.log(res);
            },
            cols: [[
                { type: "checkbox", fixed: "left", width: 50 },
                { field: 'UserGroupName', title: '用户组名称', minWidth: 100, align: "center" },
                { field: 'ParentUserGroupName', title: '父用户组名称', align: 'center', minWidth: 150 },
                {
                    field: 'CreateTime', title: '创建时间', align: 'center'
                },
                { field: 'Note', title: '备注', align: 'center', minWidth: 150 },
                { title: '操作', minWidth: 175, templet: '#userGroupListBar', fixed: "right", align: "center" }
            ]]
        });
        //搜索【此功能需要后台配合,所以暂时没有动态效果演示】
        $(".search_btn").on("click", function () {
            table.reload("userGroupListTable", {
                page: {
                    curr: 1 //重新从第 1 页开始
                },
                where: {
                    searchstr: $(".searchVal").val()  //搜索的关键字
                }
            });
        });
        //添加用户
        function addUser(edit) {
            var index = layui.layer.open({
                title: "添加/编辑用户组",
                type: 2,
                content: "/System/UserGroup/UserGroupAdd?UserGroupId=" + (edit != undefined ? edit.UserGroupId : ""),
                success: function (layero, index) {
                    var body = layui.layer.getChildFrame('body', index);
                    if (edit) {
                        body.find(".userGroupId").val(edit.UserGroupId);  //用户Id
                        body.find(".userGroupName").val(edit.UserGroupName);  //登录名
                        body.find(".parentUserGroupId").val(edit.ParentUserGroupId);  //父用户组
后面还有 63 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。