用户管理添加用户需要填写手机号(工作流创建需要,不然会报错)
This commit is contained in:
parent
60691df3a6
commit
3156606c90
@ -386,24 +386,31 @@ const handleDetail = async (rowId: number) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
loading.value = true
|
|
||||||
// 提交请求
|
// 提交请求
|
||||||
try {
|
const elForm = unref(formRef)?.getElFormRef()
|
||||||
const data = unref(formRef)?.formModel as UserApi.UserVO
|
if (!elForm) return
|
||||||
if (actionType.value === 'create') {
|
elForm.validate(async (valid) => {
|
||||||
await UserApi.createUserApi(data)
|
if (valid) {
|
||||||
message.success(t('common.createSuccess'))
|
try {
|
||||||
} else {
|
const data = unref(formRef)?.formModel as UserApi.UserVO
|
||||||
await UserApi.updateUserApi(data)
|
if (actionType.value === 'create') {
|
||||||
message.success(t('common.updateSuccess'))
|
await UserApi.createUserApi(data)
|
||||||
|
loading.value = true
|
||||||
|
message.success(t('common.createSuccess'))
|
||||||
|
} else {
|
||||||
|
await UserApi.updateUserApi(data)
|
||||||
|
loading.value = true
|
||||||
|
message.success(t('common.updateSuccess'))
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
|
} finally {
|
||||||
|
// unref(formRef)?.setSchema(allSchemas.formSchema)
|
||||||
|
// 刷新列表
|
||||||
|
await reload()
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
})
|
||||||
} finally {
|
|
||||||
// unref(formRef)?.setSchema(allSchemas.formSchema)
|
|
||||||
// 刷新列表
|
|
||||||
await reload()
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 改变用户状态操作
|
// 改变用户状态操作
|
||||||
const handleStatusChange = async (row: UserApi.UserVO) => {
|
const handleStatusChange = async (row: UserApi.UserVO) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user