Skip to content

Commit e6b6c98

Browse files
committed
fix: bug fix
1 parent e196e73 commit e6b6c98

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

frontend/src/views/system/user/User.vue

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -673,21 +673,11 @@ const deleteHandler = (row: any) => {
673673
})
674674
}
675675
676-
/* const openDialog = () => {
677-
dialogFormVisible.value = true
678-
} */
679-
const resetForm = () => {
680-
if (!termFormRef.value) return
681-
Object.keys(state.form).forEach((key) => {
682-
state.form[key as keyof typeof state.form] = ''
683-
})
684-
}
685-
686676
const closeForm = () => {
687677
dialogFormVisible.value = false
688678
}
689679
const onFormClose = () => {
690-
resetForm()
680+
state.form = { ...defaultForm }
691681
dialogFormVisible.value = false
692682
}
693683
@@ -727,19 +717,14 @@ const search = () => {
727717
}
728718
const addTerm = () => {
729719
const { account, email, name, oid, status } = state.form
730-
userApi
731-
.add({ account, email, name, oid, status })
732-
.then(() => {
733-
dialogFormVisible.value = false
734-
search()
735-
ElMessage({
736-
type: 'success',
737-
message: t('common.save_success'),
738-
})
739-
})
740-
.finally(() => {
741-
state.form = { ...defaultForm }
720+
userApi.add({ account, email, name, oid, status }).then(() => {
721+
dialogFormVisible.value = false
722+
search()
723+
ElMessage({
724+
type: 'success',
725+
message: t('common.save_success'),
742726
})
727+
})
743728
}
744729
const editTerm = () => {
745730
const { account, id, create_time, email, language, name, oid, oid_list, origin, status } =

0 commit comments

Comments
 (0)