Explorar o código

用户添加角色bug

wenhongquan %!s(int64=9) %!d(string=hai) anos
pai
achega
2838bec64b
Modificáronse 2 ficheiros con 7 adicións e 2 borrados
  1. 6 0
      VisualInspection/js/user/addUser.js
  2. 1 2
      VisualInspection/js/util/util.js

+ 6 - 0
VisualInspection/js/user/addUser.js

@@ -19,6 +19,8 @@ function loadUserData(nodedata) {
     }
     role_selectinput.closeDropDownMenu();
 
+    $(".ComboTreeItemChlid").find("input").prop('checked', false);
+
     if (edittype == "edit") {
         usertemp = nodedata;
         pnode = [{ "id": usertemp.organid }]
@@ -116,9 +118,13 @@ function initUserInfo() {
             ii["id"] = usertemp.roles[j].id;
             ii["title"] = usertemp.roles[j].des;
             attr.push(ii);
+
+            $("span[data-id='"+usertemp.roles[j].id+"']").find("input").prop('checked', true)
         }
     }
 
+    
+
     role_selectinput._selectedItems = attr;
     role_selectinput.refreshInputVal();
 

+ 1 - 2
VisualInspection/js/util/util.js

@@ -345,7 +345,6 @@ function initStringfunc(){
         }else{  
             return false;  
         }  
-        return true;  
     };  
     
     String.prototype.startWith = function(str){  
@@ -357,7 +356,7 @@ function initStringfunc(){
     }else{  
         return false;  
     }         
-    return true;   
+
     };  
 }