authority.ts
743 Bytes
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
import axios from "axios";
import qs from "qs";
/**
* 获取站点
* @param params 查询参数
* @returns 站点列表
*/
export function listDept(params: any): any {
return axios.get("/system/dept/list", {
params,
paramsSerializer: (obj) => {
return qs.stringify(obj);
},
});
}
/**
* 获取站点树
* @param params 查询参数
* @returns 站点列表树结构
*/
export function deptTree(id:any){
if(id && id > 0){
return axios.get(`system/role/deptTree/${id}`);
}else{
return axios.get(`system/role/deptTree`);
}
}
/**
* 获取站点下的成员
* @param deptId
* @returns
*/
export function getDeptMember(deptId:number) {
return axios.get(`/system/dept/list/exclude/${deptId}`)
}