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({
|
return request({
|
||||||
url: "/api/v1/dept/options",
|
url: "/api/v1/dept/options",
|
||||||
method: "get",
|
method: "get",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function getRolePage(
|
|||||||
*
|
*
|
||||||
* @param queryParams
|
* @param queryParams
|
||||||
*/
|
*/
|
||||||
export function listRoleOptions(
|
export function getRoleOptions(
|
||||||
queryParams?: RoleQuery
|
queryParams?: RoleQuery
|
||||||
): AxiosPromise<OptionType[]> {
|
): AxiosPromise<OptionType[]> {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
deleteDept,
|
deleteDept,
|
||||||
updateDept,
|
updateDept,
|
||||||
addDept,
|
addDept,
|
||||||
listDeptOptions,
|
getDeptOptions,
|
||||||
listDepts,
|
listDepts,
|
||||||
} from "@/api/dept";
|
} from "@/api/dept";
|
||||||
|
|
||||||
@@ -62,8 +62,8 @@ function handleSelectionChange(selection: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取部门下拉数据 */
|
/** 获取部门下拉数据 */
|
||||||
async function getDeptOptions() {
|
async function loadDeptOptions() {
|
||||||
listDeptOptions().then((response) => {
|
getDeptOptions().then((response) => {
|
||||||
deptOptions.value = [
|
deptOptions.value = [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
@@ -81,7 +81,7 @@ async function getDeptOptions() {
|
|||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
*/
|
*/
|
||||||
async function openDialog(parentId?: number, deptId?: number) {
|
async function openDialog(parentId?: number, deptId?: number) {
|
||||||
await getDeptOptions();
|
await loadDeptOptions();
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
if (deptId) {
|
if (deptId) {
|
||||||
dialog.title = "修改部门";
|
dialog.title = "修改部门";
|
||||||
|
|||||||
Reference in New Issue
Block a user