1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
| import createAxios from '@/utils/axios'
|
| // 部门管理API
| const url: string = '/admin/sysDepartment'
|
| const sysDepartmentService = {
| // 获取部门列表 获取第一层
| queryDepartmentList(data: object = {}): ApiPromise {
| return createAxios({
| url: `${url}/list`,
| headers: {
| 'Content-Type': 'application/json;charset=UTF-8'
| },
| data: data
| }) as ApiPromise
| },
|
| // 获取部门详情
| getDepartmentDetail(data: object = {}): ApiPromise {
| return createAxios({
| url: `${url}/detail`,
| headers: {
| 'Content-Type': 'application/json;charset=UTF-8'
| },
| data: data
| }) as ApiPromise
| },
|
| // 删除部门
| deleteDepartment(data: object = {}): ApiPromise {
| return createAxios({
| url: `${url}/delete`,
| headers: {
| 'Content-Type': 'application/json;charset=UTF-8'
| },
| data: data
| }) as ApiPromise
| },
|
| // 新增部门
| createDepartment(data: object = {}): ApiPromise {
| return createAxios({
| url: `${url}/create`,
| headers: {
| 'Content-Type': 'application/json;charset=UTF-8'
| },
| data: data
| }) as ApiPromise
| },
|
| // 修改部门信息
| updateDepartment(data: object = {}): ApiPromise {
| return createAxios({
| url: `${url}/update`,
| headers: {
| 'Content-Type': 'application/json;charset=UTF-8'
| },
| data: data
| }) as ApiPromise
| },
|
| // 查询部门类型
| queryDepartmentType(data: object = {}): ApiPromise {
| return createAxios({
| url: `${url}/types`,
| headers: {
| 'Content-Type': 'application/json;charset=UTF-8'
| },
| data: data
| }) as ApiPromise
| },
| // 查询部门的子集
| queryDepartmentlistByParentId(data: object = {}): ApiPromise {
| return createAxios({
| url: `${url}/listByParentId`,
| headers: {
| 'Content-Type': 'application/json;charset=UTF-8'
| },
| data: data
| }) as ApiPromise
| },
| }
|
| export default sysDepartmentService
|
|