From b6f38fb1e9ff62e6851dac165f312a40f41f3303 Mon Sep 17 00:00:00 2001 From: jameszow Date: Fri, 22 Sep 2023 18:12:56 +0800 Subject: [PATCH] Add department API and request response Model --- src/api/sys/dept.ts | 14 ++++++++++++++ src/api/sys/model/dpetModel.ts | 24 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/api/sys/dept.ts create mode 100644 src/api/sys/model/dpetModel.ts diff --git a/src/api/sys/dept.ts b/src/api/sys/dept.ts new file mode 100644 index 0000000..6da8e60 --- /dev/null +++ b/src/api/sys/dept.ts @@ -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>({ url: Api.DeptList, params }); diff --git a/src/api/sys/model/dpetModel.ts b/src/api/sys/model/dpetModel.ts new file mode 100644 index 0000000..fe5833d --- /dev/null +++ b/src/api/sys/model/dpetModel.ts @@ -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;