From 7b4cad2d584de1c8acc15caf3d3dbfa5ddfba692 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Mon, 9 Nov 2020 16:47:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EuserUsername=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/user/select-department-user.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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() {