mirror of
https://github.com/continew-org/continew-admin.git
synced 2026-01-07 10:57:10 +08:00
新增:新增系统管理/部门管理/修改状态及删除功能(后续几天开始对现有代码进行优化,尤其要开始初步封装前后端 CRUD 组件,并针对现在使用的部分规范发起长期投票)
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
Reference in New Issue
Block a user