自动化立体仓库 - WMS系统
chen.llin
2026-01-17 2816415f539ef54839e331657edae7055c243ad8
src/main/webapp/static/js/role/rolePower.js
@@ -39,19 +39,28 @@
    form.on('submit(save)', function () {
        var param = [];
        var checkData = tree.getChecked('powerTree');
        if (!checkData || !Array.isArray(checkData)) {
            layer.msg('没有选中的权限数据');
            return false;
        }
        checkData.map(function (obj) {
            obj.children.map(function (resource) {
                var childrens = [];
                resource.children.map(function (resource) {
                    childrens.push(resource.id);
            // 检查 obj.children 是否存在且为数组
            if (obj.children && Array.isArray(obj.children)) {
                obj.children.map(function (resource) {
                    var childrens = [];
                    // 检查 resource.children 是否存在且为数组
                    if (resource.children && Array.isArray(resource.children)) {
                        resource.children.map(function (resource) {
                            childrens.push(resource.id);
                        });
                    }
                    var one = {
                        'two': resource.id,
                        'three': childrens
                    };
                    param.push(one);
                });
                var one = {
                    'two': resource.id,
                    'three': childrens
                };
                param.push(one);
            })
            }
        });
        $.ajax({
            url: baseUrl+"/power/auth",