You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.1 KiB
58 lines
1.1 KiB
8 months ago
|
import { systemServer } from '../../index'
|
||
|
export interface DeptVO {
|
||
|
id?: number
|
||
|
name: string
|
||
|
parentId: number
|
||
|
status: number
|
||
|
sort: number
|
||
|
leaderUserId: number
|
||
|
phone: string
|
||
|
email: string
|
||
|
createTime: Date
|
||
|
}
|
||
|
|
||
|
// 查询部门(精简)列表
|
||
|
export const getSimpleDeptList = async () =>
|
||
|
systemServer<DeptVO[]>({
|
||
|
url: '/dept/simple-list',
|
||
|
method: 'get',
|
||
|
})
|
||
|
|
||
|
// 查询部门列表
|
||
|
export const getDeptPage = async (params: PageParam) =>
|
||
|
systemServer({
|
||
|
url: '/dept/page',
|
||
|
method: 'get',
|
||
|
params,
|
||
|
})
|
||
|
|
||
|
// 查询部门详情
|
||
|
export const getDept = async (id: number) =>
|
||
|
systemServer({
|
||
|
url: '/dept/get?id=' + id,
|
||
|
method: 'get',
|
||
|
})
|
||
|
|
||
|
// 新增部门
|
||
|
export const createDept = async (data: DeptVO) =>
|
||
|
systemServer({
|
||
|
url: '/dept/create',
|
||
|
method: 'post',
|
||
|
data,
|
||
|
})
|
||
|
|
||
|
// 修改部门
|
||
|
export const updateDept = async (params: DeptVO) =>
|
||
|
systemServer({
|
||
|
url: '/dept/update',
|
||
|
method: 'put',
|
||
|
data: params,
|
||
|
})
|
||
|
|
||
|
// 删除部门
|
||
|
export const deleteDept = async (id: number) =>
|
||
|
systemServer({
|
||
|
url: '/dept/delete?id=' + id,
|
||
|
method: 'delete',
|
||
|
})
|