Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Add department API and request response Model
Browse files Browse the repository at this point in the history
  • Loading branch information
Jzow committed Sep 22, 2023
1 parent 50f6114 commit b6f38fb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/api/sys/dept.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {
DeptListItem,
GetDeptInfoModel,
} from './model/dpetModel';

import { defHttp } from '/@/utils/http/axios';
import {BaseDataResp} from "@/api/model/baseModel";

enum Api {
DeptList = '/dept/userDeptRel',
}

export const getDeptList = (params?: DeptListItem) =>
defHttp.get<BaseDataResp<GetDeptInfoModel>>({ url: Api.DeptList, params });
24 changes: 24 additions & 0 deletions src/api/sys/model/dpetModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import {BasicFetchResult} from "@/api/model/baseModel";

export interface DeptListItem {
organizationName: string;
leader: string;
}

export interface GetDeptInfoModel {
// 机构id
id: string | number;
// 机构编号
deptNumber: string;
// 机构名称
deptName: string;
// 备注
remark: string;
// 父级部门id
parentId: string;
// 排序
sort: number;
}


export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;

0 comments on commit b6f38fb

Please sign in to comment.