department.js
1.23 KB
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
import request from '@/utils/request'
// 获取部门列表
export const getDepartmentList = (companyId, data) => {
return request({
url: `/permission/Organize/${companyId}/Department`,
method: 'GET',
data
})
}
// 获取部门下拉框列表(公司+部门)
export const getDepartmentSelector = (id) => {
return request({
url: '/permission/Organize/Department/Selector/' + (!!id ? id : 0),
method: 'GET'
})
}
// 新建部门
export const createDepartment = (data) => {
return request({
url: '/permission/Organize/Department',
method: 'POST',
data
})
}
// 修改部门
export const updateDepartment = (data) => {
return request({
url: `/permission/Organize/Department/${data.id}`,
method: 'PUT',
data
})
}
// 获取部门信息
export const getDepartmentInfo = (id) => {
return request({
url: `/permission/Organize/Department/${id}`,
method: 'GET'
})
}
// 删除部门
export const delDepartment = (id) => {
return request({
url: `/permission/Organize/Department/${id}`,
method: 'DELETE'
})
}
// 更新部门状态
export const updateDepartmentState = (id) => {
return request({
url: `/permission/Organize/Department/${id}/Actions/State`,
method: 'PUT'
})
}