|
|
@@ -32,7 +32,7 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import { SysDepartment, userManageDepartmentApi } from "@/api"; |
|
|
|
import { FormOptEnum, SysDictEnum } from "@/enums"; |
|
|
|
import { FormOptEnum } from "@/enums"; |
|
|
|
import { required } from "@/utils/formRules"; |
|
|
|
import { FormInstance } from "element-plus"; |
|
|
|
import { useDictStore } from "@/stores/modules"; |
|
|
@@ -86,16 +86,16 @@ async function handleSubmit() { |
|
|
|
//提交表单 |
|
|
|
if (departmentProps.opt == FormOptEnum.ADD) { |
|
|
|
await userManageDepartmentApi |
|
|
|
.add(departmentProps.record, departmentProps.record.id != undefined) |
|
|
|
.add(departmentProps.record) |
|
|
|
.then(() => { |
|
|
|
departmentProps.successful!(); //调用父组件的successful方法 |
|
|
|
departmentProps.successful!(true); //调用父组件的successful方法 |
|
|
|
}) |
|
|
|
.finally(() => { |
|
|
|
onClose(); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
await userManageDepartmentApi |
|
|
|
.update(departmentProps.record, departmentProps.record.id != undefined) |
|
|
|
.update(departmentProps.record) |
|
|
|
.then(() => { |
|
|
|
departmentProps.successful!(); //调用父组件的successful方法 |
|
|
|
}) |
|
|
|