This commit is contained in:
BianLzhaoMin 2025-01-03 15:17:33 +08:00
parent 2bce41582e
commit 5dd0386da4
1 changed files with 8 additions and 1 deletions

View File

@ -226,6 +226,7 @@ export default {
},
methods: {
handleClose() {
this.$refs.addOrEditFormRef.resetFields()
this.$emit('update:formDialogVisible', false)
},
onSubmitForm() {
@ -239,7 +240,8 @@ export default {
logo,
nickName,
phonenumber,
userName,
deptId,
parentId,
} = this.addOrEditForm
const params = {
deptName,
@ -254,6 +256,11 @@ export default {
password,
},
}
if (this.formType == 2) {
params.deptId = deptId
params.parentId = parentId
}
const SEND_FUN =
this.formType == 2 ? editCompanyAPI : addCompanyAPI
const res = await SEND_FUN(params)