refactor: ♻️ aPI 方法名合理性修改

Former-commit-id: 95e0f44edc317e1d237cc155afde3e61387dae44
This commit is contained in:
hxr
2023-10-06 00:02:37 +08:00
parent 74bbfdcef7
commit 031dd032c4
3 changed files with 6 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ export function listDepts(queryParams?: DeptQuery): AxiosPromise<DeptVO[]> {
/**
* 部门下拉列表
*/
export function listDeptOptions(): AxiosPromise<[]> {
export function getDeptOptions(): AxiosPromise<[]> {
return request({
url: "/api/v1/dept/options",
method: "get",

View File

@@ -22,7 +22,7 @@ export function getRolePage(
*
* @param queryParams
*/
export function listRoleOptions(
export function getRoleOptions(
queryParams?: RoleQuery
): AxiosPromise<OptionType[]> {
return request({

View File

@@ -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 = "修改部门";