RoleAuthenization.js 980 B

123456789101112131415161718192021222324
  1. //$(function () {
  2. // $(".easyui-tree").tree({
  3. // onLoadSuccess: function (node, data) {
  4. // $(".easyui-tree").tree('collapseAll');
  5. // }
  6. // });
  7. //});
  8. function Role_Authenization_Save() {
  9. var selectedFunctionCodes = $("#FunctionCode").tree("getChecked");
  10. var indeterminateFunctionCodes = $("#FunctionCode").tree("getChecked", "indeterminate");
  11. var encSelectedFunctionCodes = new Array();
  12. for (var functionCode in indeterminateFunctionCodes) {
  13. encSelectedFunctionCodes.push(indeterminateFunctionCodes[functionCode].id);
  14. }
  15. for (var functionCode in selectedFunctionCodes) {
  16. encSelectedFunctionCodes.push(selectedFunctionCodes[functionCode].id);
  17. }
  18. var data = {
  19. roleID: $.SystemGeneral.getUrlParam("RoleID"),
  20. functionCodeList: encSelectedFunctionCodes.join(',')
  21. };
  22. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/Role/SaveAuthenization', data, EMISFunction.FormSuccess, 'json');
  23. }