补充用户重置密码提示

This commit is contained in:
2026-09-04 14:10:28 +08:00
parent d5535fbfa2
commit c0a51a278e
@@ -645,6 +645,19 @@ const showDefaultPasswordCreateNotice = async () => {
})
}
const showDefaultPasswordResetNotice = async () => {
const password = await resolveAdminDefaultPasswordForNotice()
Modal.success({
title: '密码重置成功',
content: h('div', { class: 'default-password-notice' }, [
h('p', '该用户的密码已重置为后台默认密码,请及时告知用户并提醒首次登录后修改。'),
h('div', { class: 'default-password-notice__value' }, password)
]),
okText: '一键复制密码',
onOk: () => copyTextToClipboard(password)
})
}
/** normalizeUserType is a local helper used by this page script. */
const normalizeUserType = (value: unknown) => {
const type = Number(value)
@@ -1646,7 +1659,7 @@ const handleResetPassword = (record: any) => {
try {
await runWithGlobalLoading(async () => {
await adminUserApi.resetPassword(record.id)
message.success('密码重置成功')
await showDefaultPasswordResetNotice()
})
} catch (error) {
console.error('重置密码失败:', error)