Commit 3156606c by gexinzhineng/gxzn27

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

parent 60691df3
...@@ -386,15 +386,20 @@ const handleDetail = async (rowId: number) => { ...@@ -386,15 +386,20 @@ const handleDetail = async (rowId: number) => {
// 提交按钮 // 提交按钮
const submitForm = async () => { const submitForm = async () => {
loading.value = true
// 提交请求 // 提交请求
const elForm = unref(formRef)?.getElFormRef()
if (!elForm) return
elForm.validate(async (valid) => {
if (valid) {
try { try {
const data = unref(formRef)?.formModel as UserApi.UserVO const data = unref(formRef)?.formModel as UserApi.UserVO
if (actionType.value === 'create') { if (actionType.value === 'create') {
await UserApi.createUserApi(data) await UserApi.createUserApi(data)
loading.value = true
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await UserApi.updateUserApi(data) await UserApi.updateUserApi(data)
loading.value = true
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
dialogVisible.value = false dialogVisible.value = false
...@@ -404,6 +409,8 @@ const submitForm = async () => { ...@@ -404,6 +409,8 @@ const submitForm = async () => {
await reload() await reload()
loading.value = false loading.value = false
} }
}
})
} }
// 改变用户状态操作 // 改变用户状态操作
const handleStatusChange = async (row: UserApi.UserVO) => { const handleStatusChange = async (row: UserApi.UserVO) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment