liuxiaolong
2019-05-06 8700cf1dc46c350371d865532c2914595187788e
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
85
86
87
88
// 组织机构
 
import { httpGET, httpPOST } from './common/httpFetch'
 
/**
 * @description 组织机构-树形展示接口
 * @param { string } orgId    分库orgId
 * @param { string } orgById  机构Id
 */
export const getOrgTree = body => {
  return httpGET('data/api-u/org/tree', { body })
}
 
/**
 * @description 查询全局组织机构类型
 */
export const getOrgType = body => {
  return httpGET('data/api-u/org/getOrgType', { body })
}
 
/**
 * @description 组织结构添加
 * @method POST
 * @param { string }  orgId  哪个学校的组织架构
 * @param { string } parentId 父级Id
 * @param { string } headquartersId 总校Id
 * @param { string } areaId 上级主管单位id
 * @param { string } name 组织名称
 * @param { string } type 组织类型
 * @param { string } address 地址
 * @param { string } master 联系人
 * @param { string } phone 手机号
 * @param { string } webUrl 网址
 */
export const getOrgAdd = body => {
  return httpPOST('data/api-u/org/save', { body })
}
 
/**
 * @description 查询全局组织机构类型
 * @param { string } orgId 哪个学校的组织架构
 * @param { string } id 字典id
 * @param { string } type 字典类型
 */
export const getOrgTypeAll = body => {
  return httpGET('data/api-u/glo/getOrgType', { body })
}
 
/**
 * @description 组织机构删除
 * @param { string } orgId 哪个学校的组织架构
 * @param { string } id 机构id
 */
export const getOrgDel = body => {
  return httpGET('data/api-u/org/delete', { body })
}
 
/**
 * 查询上级组织机构
 * @description 如果当前选择不是组织机构,调用此接口,查询上级组织机构
 * @param { string } orgId 哪个学校的组织架构
 * @param { string } currentId 机构id
 */
export const getUpOrg = body => {
  return httpGET('data/api-u/org/findUpById', { body })
}
 
/**
 * 查询上级组织机构
 * @description 如果当前选择不是组织机构,调用此接口,查询上级组织机构
 * @param { string } orgId 哪个学校的组织架构
 * @param { userId  } userId  用户id
 */
export const getPermission = body => {
  return httpGET('data/api-u/sysmenus/findMenuIdsByUserId', { body })
}
 
/**
 * 查询上级组织机构
 * @description 如果当前选择不是组织机构,调用此接口,查询上级组织机构
 * @param { string } orgId 哪个学校的组织架构
 * @param { userId  } userId  用户id
 * @param { userId  } orgName  组织名称
 * @param { userId  } menuIds   菜单ids,字符串’,’分割
 */
export const savePermission = body => {
  return httpPOST('data/api-u/roles/saveUserRoleMens', { body })
}