This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add department API and request response Model
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>; |