// 组织机构
|
|
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 })
|
}
|