refactor: ♻️ aPI 方法名合理性修改
Former-commit-id: 95e0f44edc317e1d237cc155afde3e61387dae44
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -22,7 +22,7 @@ export function getRolePage(
|
||||
*
|
||||
* @param queryParams
|
||||
*/
|
||||
export function listRoleOptions(
|
||||
export function getRoleOptions(
|
||||
queryParams?: RoleQuery
|
||||
): AxiosPromise<OptionType[]> {
|
||||
return request({
|
||||
|
||||
@@ -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 = "修改部门";
|
||||
|
||||
Reference in New Issue
Block a user