//$(function () { // $(".easyui-tree").tree({ // onLoadSuccess: function (node, data) { // $(".easyui-tree").tree('collapseAll'); // } // }); //}); function Role_Authenization_Save() { var selectedFunctionCodes = $("#FunctionCode").tree("getChecked"); var indeterminateFunctionCodes = $("#FunctionCode").tree("getChecked", "indeterminate"); var encSelectedFunctionCodes = new Array(); for (var functionCode in indeterminateFunctionCodes) { encSelectedFunctionCodes.push(indeterminateFunctionCodes[functionCode].id); } for (var functionCode in selectedFunctionCodes) { encSelectedFunctionCodes.push(selectedFunctionCodes[functionCode].id); } var data = { roleID: $.SystemGeneral.getUrlParam("RoleID"), functionCodeList: encSelectedFunctionCodes.join(',') }; $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Role/SaveAuthenization', data, EMISFunction.FormSuccess, 'json'); }