懒羊羊
2024-01-31 e57a8990ae56f657a59c435a0613c5f7a8728003
提交 | 用户 | 时间
e57a89 1 import request from '@/utils/request'
2
3 // 查询部门列表
4 export function listDept(query) {
5   return request({
6     url: '/system/dept/list',
7     method: 'get',
8     params: query
9   })
10 }
11
12 // 查询部门列表(排除节点)
13 export function listDeptExcludeChild(deptId) {
14   return request({
15     url: '/system/dept/list/exclude/' + deptId,
16     method: 'get'
17   })
18 }
19
20 // 查询部门详细
21 export function getDept(deptId) {
22   return request({
23     url: '/system/dept/' + deptId,
24     method: 'get'
25   })
26 }
27
28 // 新增部门
29 export function addDept(data) {
30   return request({
31     url: '/system/dept',
32     method: 'post',
33     data: data
34   })
35 }
36
37 // 修改部门
38 export function updateDept(data) {
39   return request({
40     url: '/system/dept',
41     method: 'put',
42     data: data
43   })
44 }
45
46 // 删除部门
47 export function delDept(deptId) {
48   return request({
49     url: '/system/dept/' + deptId,
50     method: 'delete'
51   })
52 }