mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
fix: update user error
This commit is contained in:
parent
cdeaf5b892
commit
ff938a9e30
@ -114,18 +114,19 @@ const setDialogTile = async (type: string) => {
|
|||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
// 重置表单
|
// 重置表单
|
||||||
deptId.value = 0
|
deptId.value = 0
|
||||||
unref(formRef)?.getElFormRef()?.resetFields()
|
|
||||||
setDialogTile('create')
|
setDialogTile('create')
|
||||||
|
unref(formRef)?.getElFormRef()?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改操作
|
// 修改操作
|
||||||
const handleUpdate = async (row: UserVO) => {
|
const handleUpdate = async (row: UserVO) => {
|
||||||
|
await setDialogTile('update')
|
||||||
// 设置数据
|
// 设置数据
|
||||||
const res = await UserApi.getUserApi(row.id)
|
const res = await UserApi.getUserApi(row.id)
|
||||||
|
console.info(res)
|
||||||
deptId.value = res.deptId
|
deptId.value = res.deptId
|
||||||
postIds.value = res.postIds
|
postIds.value = res.postIds
|
||||||
unref(formRef)?.setValues(res)
|
unref(formRef)?.setValues(res)
|
||||||
await setDialogTile('update')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
|
Loading…
Reference in New Issue
Block a user