diff --git a/cloud-common-plugin-oauth/src/main/resources/templates/user/select-department-user.html b/cloud-common-plugin-oauth/src/main/resources/templates/user/select-department-user.html index 9b77e11..2213de0 100644 --- a/cloud-common-plugin-oauth/src/main/resources/templates/user/select-department-user.html +++ b/cloud-common-plugin-oauth/src/main/resources/templates/user/select-department-user.html @@ -135,7 +135,7 @@ } else { avatarDom = ' '; } - userDom += ''+ avatarDom + item.userName +' ['+ item.userUsername +']'; + userDom += ''+ avatarDom + item.userName +' ['+ item.userUsername +']'; } $('#userWrapper').append(userDom); } @@ -162,7 +162,7 @@ } else { avatarDom = ' '; } - userDom += ''+ avatarDom + item.userName +' ['+ item.userUsername +']'; + userDom += ''+ avatarDom + item.userName +' ['+ item.userUsername +']'; } $('#userWrapper').append(userDom); } @@ -221,9 +221,10 @@ selectedUserIds: selectedUserIds }, null, function(code, data) { for(var i = 0, item; item = data[i++]; ) { - selectUser(item.userId, item.userName); + selectUser(item.userId, item.userName, item.userUsername); selectDepartmentUserOldArray.push({ userId: item.userId, + userUsername: item.userUsername, userName: item.userName }); } @@ -285,11 +286,12 @@ } } // 选择人员 - function selectUser(userId, userName, isOnlySelect) { + function selectUser(userId, userName, userUsername, isOnlySelect) { if(!isUserSelected(userId)) { $('#user_'+ userId).addClass('user-selected'); selectDepartmentUserArray.push({ userId: userId, + userUsername: userUsername, userName: userName }); $('#selectUsers').append(''+ userName +' '); @@ -302,7 +304,7 @@ } $(document.body).on('click', '*[lay-click-user]', null, function() { var data = this.dataset; - selectUser(data.userid, data.username); + selectUser(data.userid, data.username, data.userUsername); }); $(document.body).on('click', '*[lay-click-removeuser]', null, function() { var data = this.dataset; @@ -311,7 +313,7 @@ $(document.body).on('click', '*[lay-click-select-all-user]', null, function() { $('#userWrapper').children().each(function() { var data = this.dataset; - selectUser(data.userid, data.username, true); + selectUser(data.userid, data.username, data.userUsername, true); }); }); $(document.body).on('click', '*[lay-click-clear-all-user]', null, function() {