mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-19 07:56:38 +08:00
33 lines
848 B
TypeScript
33 lines
848 B
TypeScript
import { http } from "@/utils/http";
|
|
import type { Result, ResultPage } from "@/api/result";
|
|
|
|
/** 查询岗位列表 */
|
|
export const getList = (data?: object) => {
|
|
return http.request<ResultPage>("get", "/dept", { data });
|
|
};
|
|
|
|
/** 查询部门详细 */
|
|
export const getPost = id => {
|
|
return http.request<Result>("get", `/dept/${id}`, {});
|
|
};
|
|
|
|
/** 新增部门 */
|
|
export const addPost = data => {
|
|
return http.request<Result>("post", `/dept`, { data });
|
|
};
|
|
|
|
/** 修改部门 */
|
|
export const updatePost = (id, data) => {
|
|
return http.request<Result>("put", `/dept/${id}`, { data });
|
|
};
|
|
|
|
/** 删除部门 */
|
|
export const delPost = id => {
|
|
return http.request<Result>("delete", `/dept`, { params: { id } });
|
|
};
|
|
|
|
/** 获取部门选择框列表 */
|
|
export const getPostOptionSelect = () => {
|
|
return http.request<Result>("get", `/post`, {});
|
|
};
|