import { request, METHOD, } from '@/utils/request'

//获取业务数据列表
export async function getBusinessList(data) {
    return request("/taskStatistics/getBusinessData", METHOD.POST, data)
}
//获取业务数据详情列表
export async function getBusinessDetailList(data) {
    return request("/taskStatistics/getDistribution", METHOD.POST, data)
}
//获取业务数据代理人列表
export async function getBusinessAgentList(data) {
    return request("/taskStatistics/getBusinessAgentData", METHOD.POST, data)
}
//获取业务数据代理人总计
export async function getBusinessAgentTotalList(data) {
    return request("/taskStatistics/getBusinessAgentDataTotal", METHOD.POST, data)
}
//获取业务数据代理人总计
export async function getBusinessAgentTotalDetails(data) {
    return request("/taskStatistics/getBusinessAgentDataDetails", METHOD.POST, data)
}

//获取人员树
export async function getUserTree(data) {
    return request("/user/findNextTree", METHOD.GET, data)
}
//获取代理人员树
export async function findNextAgentTree(data) {
    return request("/user/findNextAgentTree", METHOD.GET, data)
}

//获取树形结构代理人及渠道
export async function findAgentChanellTree(data) {
    return request("/dept/getUserDeptTree", METHOD.POST, data)
}





export default {
    getBusinessList,
    getBusinessDetailList,
    getBusinessAgentList,
    getBusinessAgentTotalList,
    getUserTree,
    getBusinessAgentTotalDetails,
    findNextAgentTree,
    findAgentChanellTree
}
