fix: 修复新增租户报错

This commit is contained in:
xingyu
2022-10-11 17:10:57 +08:00
parent 9ab4165c4e
commit 0c362b64c2
5 changed files with 31 additions and 6 deletions

View File

@@ -112,20 +112,20 @@ const setDialogTile = async (type: string) => {
// 新增操作
const handleAdd = () => {
setDialogTile('create')
// 重置表单
deptId.value = 0
unref(formRef)?.getElFormRef()?.resetFields()
setDialogTile('create')
}
// 修改操作
const handleUpdate = async (row: UserVO) => {
await setDialogTile('update')
// 设置数据
const res = await UserApi.getUserApi(row.id)
deptId.value = res.deptId
postIds.value = res.postIds
unref(formRef)?.setValues(res)
await setDialogTile('update')
}
// 提交按钮
@@ -281,9 +281,9 @@ const excelUploadError = (): void => {
}
// ========== 初始化 ==========
onMounted(async () => {
await getTree()
await getPostOptions()
await getList()
await getTree()
})
</script>