新增:新增系统管理/部门管理/修改状态及删除功能(后续几天开始对现有代码进行优化,尤其要开始初步封装前后端 CRUD 组件,并针对现在使用的部分规范发起长期投票)

This commit is contained in:
2023-01-25 12:59:30 +08:00
parent 922b28126b
commit 693e825144
7 changed files with 175 additions and 27 deletions

View File

@@ -2,12 +2,12 @@ import axios from 'axios';
import qs from 'query-string';
export interface DeptRecord {
deptId: string;
deptId?: number;
deptName: string;
parentId: number;
parentId?: number;
deptSort: number;
description: string;
status: number;
status?: number;
updateUserString: string;
updateTime: string;
children: Array<DeptRecord>,
@@ -35,4 +35,15 @@ export interface CreateDeptReq {
}
export function createDept(req: CreateDeptReq) {
return axios.post('/system/dept', req);
}
export interface UpdateDeptStatusReq {
status: number;
}
export function updateDeptStatus(ids: Array<number>, req: UpdateDeptStatusReq) {
return axios.patch(`/system/dept/${ids}`, req);
}
export function deleteDept(ids: Array<number>) {
return axios.delete(`/system/dept/${ids}`);
}