用户管理添加用户需要填写手机号(工作流创建需要,不然会报错)

pull/7/head
gexinzhineng/gxzn27 2023-03-02 15:34:14 +08:00
parent 60691df3a6
commit 3156606c90
1 changed files with 23 additions and 16 deletions

View File

@ -386,24 +386,31 @@ const handleDetail = async (rowId: number) => {
//
const submitForm = async () => {
loading.value = true
//
try {
const data = unref(formRef)?.formModel as UserApi.UserVO
if (actionType.value === 'create') {
await UserApi.createUserApi(data)
message.success(t('common.createSuccess'))
} else {
await UserApi.updateUserApi(data)
message.success(t('common.updateSuccess'))
const elForm = unref(formRef)?.getElFormRef()
if (!elForm) return
elForm.validate(async (valid) => {
if (valid) {
try {
const data = unref(formRef)?.formModel as UserApi.UserVO
if (actionType.value === 'create') {
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) => {