diff --git a/src/api/dept/index.ts b/src/api/dept/index.ts index 2d2cff4f..77e3973a 100644 --- a/src/api/dept/index.ts +++ b/src/api/dept/index.ts @@ -18,7 +18,7 @@ export function listDepts(queryParams?: DeptQuery): AxiosPromise { /** * 部门下拉列表 */ -export function listDeptOptions(): AxiosPromise<[]> { +export function getDeptOptions(): AxiosPromise<[]> { return request({ url: "/api/v1/dept/options", method: "get", diff --git a/src/api/role/index.ts b/src/api/role/index.ts index f5f93a52..fdbc65cd 100644 --- a/src/api/role/index.ts +++ b/src/api/role/index.ts @@ -22,7 +22,7 @@ export function getRolePage( * * @param queryParams */ -export function listRoleOptions( +export function getRoleOptions( queryParams?: RoleQuery ): AxiosPromise { return request({ diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 605512f5..ae5b85dd 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -4,7 +4,7 @@ import { deleteDept, updateDept, addDept, - listDeptOptions, + getDeptOptions, listDepts, } from "@/api/dept"; @@ -62,8 +62,8 @@ function handleSelectionChange(selection: any) { } /** 获取部门下拉数据 */ -async function getDeptOptions() { - listDeptOptions().then((response) => { +async function loadDeptOptions() { + getDeptOptions().then((response) => { deptOptions.value = [ { value: 0, @@ -81,7 +81,7 @@ async function getDeptOptions() { * @param deptId 部门ID */ async function openDialog(parentId?: number, deptId?: number) { - await getDeptOptions(); + await loadDeptOptions(); dialog.visible = true; if (deptId) { dialog.title = "修改部门";