mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: bug fix
This commit is contained in:
@@ -740,26 +740,6 @@ const editTerm = () => {
|
||||
}
|
||||
|
||||
const duplicateName = async () => {
|
||||
const res = await userApi.pager({}, 1, 1000)
|
||||
const arr = res.filter((ele: any) => ele.id !== state.form.id)
|
||||
const names = arr.map((ele: any) => ele.name)
|
||||
const accounts = arr.map((ele: any) => ele.account)
|
||||
const emails = arr.map((ele: any) => ele.email)
|
||||
if (names.includes(state.form.name)) {
|
||||
ElMessage.error(t('embedded.duplicate_name_'))
|
||||
return
|
||||
}
|
||||
|
||||
if (accounts.includes(state.form.account)) {
|
||||
ElMessage.error(t('embedded.duplicate_account'))
|
||||
return
|
||||
}
|
||||
|
||||
if (emails.includes(state.form.email)) {
|
||||
ElMessage.error(t('embedded.duplicate_email'))
|
||||
return
|
||||
}
|
||||
|
||||
if (state.form.id) {
|
||||
editTerm()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user