Skip to content

Commit

Permalink
fix(系统设置): 机构管理/角色管理
Browse files Browse the repository at this point in the history
优化绑定用户:重复绑定的问题
  • Loading branch information
Lind-pro committed Dec 11, 2020
1 parent 3ea6a7c commit 7eed292
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/pages/system/org/user/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const UserList: React.FC<Props> = props => {
});
if (index === selectRow.length - 1) {
message.success('操作成功!');
props.close();
setLoading(false);
}
});
Expand Down
9 changes: 6 additions & 3 deletions src/pages/system/role/user/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ const UserList: React.FC<Props> = props => {
}, []);

// { "dimensionTypeId": "org", "dimensionId": "org1", "dimensionName": "机构1", "userId": "1209763126217355264", "userName": "antd" }
const bindUser = () => {

const bindUser = async () => {

setLoading(true);
selectRow.forEach((item, index) => {

await selectRow.forEach((item, index) => {
apis.org
.bind({
userId: item.id,
Expand All @@ -83,11 +86,11 @@ const UserList: React.FC<Props> = props => {
})
.catch(() => {
message.success('绑定失败!');
setLoading(false);
});
if (index === selectRow.length - 1) {
message.success('操作成功!');
setLoading(false);
props.close()
}
});
};
Expand Down

0 comments on commit 7eed292

Please sign in to comment.