/**
  授权管理 权限管理
 @author laiyh
 @Date 2020-09-15

 */
import req from "@/utils/req";

export const base = "/authsvr/v2/applicationinfo/appQutoList";
export const tableUrl = `${base}/_search`;
// 机构配额
export const baseOrg = `/authsvr/v2/orgQuota`;

// 获取指定机构配额分配信息
export function getOrgQuotaInfos(data) {
    return req.post(`${baseOrg}/orgQuotaInfos/_search`, data);
}

// 保存配额信息
export function saveOrgQuotas(data) {
    return req.post(`${baseOrg}/orgQuota`, data, { loading: true });
}

// 回收配额
export function authCancelChild(data) {
    return req.post(`${baseOrg}/authCancelChild`, data);
}

// 匹配单位数
export function getMateCount(data) {
    return req.get(`${baseOrg}/searchOrg`, data);
}
// 计算结果
export function getQuataTreeYB(data) {
    return req.get(`${baseOrg}/calQuotaTreeYB`, data,{loading: true});
}

// 配额批量下发
export function orgQuotaSave(data) {
    return req.post(`${baseOrg}/orgQuotaCalSave`, data);
}

// 根据机构id 获取权限管理页面列表
export const authTableUrl = `authsvr/v2/applicationinfo/appList/_search`
