提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface DeptVO { |
|
4 |
id?: number |
|
5 |
name: string |
|
6 |
parentId: number |
|
7 |
status: number |
|
8 |
sort: number |
|
9 |
leaderUserId: number |
|
10 |
phone: string |
|
11 |
email: string |
|
12 |
createTime: Date |
|
13 |
} |
|
14 |
|
|
15 |
// 查询部门(精简)列表 |
|
16 |
export const getSimpleDeptList = async (): Promise<DeptVO[]> => { |
|
17 |
return await request.get({ url: '/system/dept/simple-list' }) |
|
18 |
} |
|
19 |
|
|
20 |
// 查询部门列表 |
|
21 |
export const getDeptPage = async (params: PageParam) => { |
|
22 |
return await request.get({ url: '/system/dept/list', params }) |
|
23 |
} |
|
24 |
|
|
25 |
// 查询部门详情 |
|
26 |
export const getDept = async (id: number) => { |
|
27 |
return await request.get({ url: '/system/dept/get?id=' + id }) |
|
28 |
} |
|
29 |
|
|
30 |
// 新增部门 |
|
31 |
export const createDept = async (data: DeptVO) => { |
|
32 |
return await request.post({ url: '/system/dept/create', data: data }) |
|
33 |
} |
|
34 |
|
|
35 |
// 修改部门 |
|
36 |
export const updateDept = async (params: DeptVO) => { |
|
37 |
return await request.put({ url: '/system/dept/update', data: params }) |
|
38 |
} |
|
39 |
|
|
40 |
// 删除部门 |
|
41 |
export const deleteDept = async (id: number) => { |
|
42 |
return await request.delete({ url: '/system/dept/delete?id=' + id }) |
|
43 |
} |