Skip to content

Commit

Permalink
add key
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihanChen821 committed Sep 20, 2023
1 parent 3b1b7d4 commit 03dc0ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/mis-web/src/pageComponents/users/UserTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,13 @@ export const UserTable: React.FC<Props> = ({
icon: <ExclamationCircleOutlined />,
content: `确认要从账户${accountName}移出用户${r.name}(ID:${r.userId})?`,
onOk: async () => {
message.open({ type: "loading", content: "操作所需时间较长,请耐心等待", duration: 0 });
message.open({ type: "loading", content: "操作所需时间较长,请耐心等待", duration: 0, key: "removeUser" });
await api.removeUserFromAccount({ query: {
identityId: r.userId,
accountName: accountName,
} })
.then(() => {
message.destroy();
message.destroy("removeUser");
message.success("移出用户成功!");
reload();
});
Expand Down
4 changes: 2 additions & 2 deletions apps/mis-web/src/pages/tenant/accounts/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const CreateAccountForm: React.FC<CreateAccountFormProps> = ({ tenantName }) =>
const submit = async () => {
const { accountName, ownerId, ownerName, comment } = await form.validateFields();
setLoading(true);
message.open({ type: "loading", content: "操作所需时间较长,请耐心等待", duration: 0 });
message.open({ type: "loading", content: "操作所需时间较长,请耐心等待", duration: 0, key: "createAccount" });
await api.createAccount({ body: { accountName, ownerId, ownerName, comment } })
.httpError(404, () => { message.error(`租户 ${tenantName} 下不存在用户 ${ownerId}。`); })
.httpError(409, () => { message.error("账户名已经被占用"); })
Expand All @@ -54,7 +54,7 @@ const CreateAccountForm: React.FC<CreateAccountFormProps> = ({ tenantName }) =>
message.success("创建成功!");
})
.finally(() => {
message.destroy();
message.destroy("createAccount");
setLoading(false);
});
};
Expand Down

0 comments on commit 03dc0ce

Please sign in to comment.