mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-14 03:01:36 +08:00
优化:优化后端 CRUD 公共组件(移除 BaseService 中无用的默认实现,抽取 BaseRequest 基类来方便使用分组校验),并同步调整部门管理 API
This commit is contained in:
@@ -27,21 +27,22 @@ export function getDeptList(params: DeptParams) {
|
||||
});
|
||||
}
|
||||
|
||||
export interface CreateDeptReq {
|
||||
export interface DeptReq {
|
||||
parentId: number;
|
||||
deptName: string;
|
||||
deptSort: number;
|
||||
description: string;
|
||||
}
|
||||
export function createDept(req: CreateDeptReq) {
|
||||
export function createDept(req: DeptReq) {
|
||||
return axios.post('/system/dept', req);
|
||||
}
|
||||
|
||||
export interface UpdateDeptStatusReq {
|
||||
status: number;
|
||||
export interface UpdateDeptReq extends Partial<DeptReq> {
|
||||
deptId: number;
|
||||
status?: number;
|
||||
}
|
||||
export function updateDeptStatus(ids: Array<number>, req: UpdateDeptStatusReq) {
|
||||
return axios.patch(`/system/dept/${ids}`, req);
|
||||
export function updateDept(req: UpdateDeptReq) {
|
||||
return axios.put(`/system/dept`, req);
|
||||
}
|
||||
|
||||
export function deleteDept(ids: Array<number>) {
|
||||
|
Reference in New Issue
Block a user