import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/admin/user/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/admin/user',
    method: 'post',
    data: obj
  })
}

export function delObj(id) {
  return request({
    url: '/admin/user/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/admin/user',
    method: 'put',
    data: obj
  })
}

// 首页卡片
export function houseIndex(query) {
  return request({
    url: 'autoSR/cusStageStatistics/houseIndex',
    method:'get',
    params:query
  })
}

//首页设备
export function findAllZkEquipment(query) {
  return request({
    url: 'autoSR/cusStageStatistics/findAllZkEquipment',
    method:'get',
    params:query
  })
}


//首页违禁查询
export function findProhibitedRecord(query) {
  return request({
    url: 'autoSR/cusStageStatistics/findProhibitedRecord',
    method:'get',
    params:query
  })
}


//首页维度触达
export function getindexZxllist(query) {
  return request({
    url: 'autoSR/cusStageStatistics/indexZxl',
    method:'get',
    params:query
  })
}

//首页员工排名
export function getemployeeExecutionRatelist(query) {
  return request({
    url: 'autoSR/cusStageStatistics/employeeExecutionRate',
    method:'get',
    params:query
  })
}




// 代理商管理列表
export function getAgentList(query) {
  return request({
    url: '/autoSR/zkagent/page',
    method:'get',
    params: {orgType:localStorage.getItem('orgType'),...query}
  })
}

//省市
export function getparentIdList(query) {
  return request({
    url: '/autoSR/zksysarea/list',
    method:'get',
    params:query
  })
}

//获取运营人员
export function getAllOperationsStaff(query) {
  return request({
    url: '/admin/user/getAllOperationsStaff',
    method:'get'
  })
}

//添加代理商
export function AddAgent(data) {
  return request({
    url: '/autoSR/zkagent/save',
    method:'post',
    data
  })
}

//删除代理商
export function delAgent(data) {
  return request({
    url: '/autoSR/zkagent/del',
    method:'post',
    data
  })
}

//更换管理账号
export function updateManagerPhone(data) {
  return request({
    url: '/autoSR/zkagent/updateManagerPhone',
    method:'post',
    data
  })
}

//编辑代理商
export function editorAgent(data) {
  return request({
    url: '/autoSR/zkagent/update',
    method:'post',
    data
  })
}


//公司管理列表
export function getcompanyList(query) {
  return request({
    url: '/autoSR/zkorg/page',
    method:'get',
    params:query
  })
}

//获取代理商
export function findMyAgent(query) {
  return request({
    url: 'autoSR/zkagent/findMyAgent',
    method:'get',
    params:query
  })
}

//获取运营人员列表
export function getAllOperationsStaffByAgent(query) {
  return request({
    url: 'admin/user/getAllOperationsStaffByAgent',
    method:'get',
    params:query
  })
}

//添加公司
export function AddaddOrg(data) {
  return request({
    url: '/autoSR/zkorg/addOrg',
    method:'post',
    data
  })
}

//删除公司
export function delOrg(data) {
  return request({
    url: '/autoSR/zkorg/delOrg',
    method:'post',
    data
  })
}

//公司更换运营人员
export function changeAccount(data) {
  return request({
    url: '/autoSR/zkorg/updateManagerPhone',
    method:'post',
    data
  })
}

//编辑公司获取公司信息
export function gitfindById(query) {
  return request({
    url: '/autoSR/zkorg/findById',
    method:'get',
    params:query
  })
}

//公司编辑
export function updateOrg(data) {
  return request({
    url: '/autoSR/zkorg/updateOrg',
    method:'post',
    data
  })
}

//设备批次列表
export function getequipmentbatch(query) {
  return request({
    url: '/autoSR/zkequipmentbatch/page',
    method:'get',
    params:query
  })
}

//绑定批次
export function insert(data) {
  return request({
    url: '/autoSR/zkequipmentbatch/insert',
    method:'post',
    data
  })
}

//修改批次
export function insertupdate(data) {
  return request({
    url: '/autoSR/zkequipmentbatch/update',
    method:'post',
    data
  })
}


//用户洞察
export function findmatchdata(query) {
  return request({
    url: '/autoSR/matchKeywords/findmatchdata',
    method:'get',
    params:query
  })
}

//用户洞察详情
export function receptionRecord(query) {
  return request({
    url: '/autoSR/matchKeywords/receptionRecord',
    method:'get',
    params:query
  })
}

//用户洞察详情获取语义词
export function findKeywords(query) {
  return request({
    url: '/autoSR/matchKeywords/findKeywords',
    method:'get',
    params:query
  })
}

//获取销讲词话术列表
export function templatefindByPage(query) {
  return request({
    url: 'autoSR/template/findByPage',
    method:'get',
    params:query
  })
}


//停，启销讲词模板
export function templatestartOrStop(query) {
  return request({
    url: 'autoSR/template/startOrStop',
    method:'get',
    params:query
  })
}

//删除讲词模板
export function templatedel(query) {
  return request({
    url: '/autoSR/template/del',
    method:'get',
    params:query
  })
}


//销讲词编辑分数
export function templatedelfindByTempId(query) {
  return request({
    url: '/autoSR/template/findByTempId',
    method:'get',
    params:query
  })
}


//销讲词模板编辑后保存
export function templategeaddTemplate(data) {
  return request({
    url: '/autoSR/marketing/addTemplate',
    method:'post',
    data
  })
}


//销讲词模板
export function templategetMarketingTree(query) {
  return request({
    url: '/autoSR/marketing/getSystemDefault',
    method:'get',
    params:query
  })
}

//销讲词模板添加一二三级
export function templategeadd(data) {
  return request({
    url: 'autoSR/marketing/add',
    method:'post',
    data
  })
}

//删除销讲词模板一二三级
export function templategedel(query) {
  return request({
    url: '/autoSR/marketing/del',
    method:'get',
    params:query
  })
}


//编辑销讲词模板一二三级
export function templategeupdate(query) {
  return request({
    url: 'autoSR/marketing/update',
    method:'get',
    params:query
  })
}


//销讲词模板一二三级排序
export function templategeupdateSort(data) {
  return request({
    url: 'autoSR/marketing/updateSort',
    method:'post',
    data
  })
}



//禁忌列表
export function taboofindbypage(query) {
  return request({
    url: 'autoSR/sensitivewords/findbypage',
    method:'get',
    params:query
  })
}

//添加禁忌
export function tabooadd(data) {
  return request({
    url: 'autoSR/sensitivewords/add',
    method:'post',
    data
  })
}


//修改禁忌
export function tabooupdate(data) {
  return request({
    url: 'autoSR/sensitivewords/update',
    method:'post',
    data
  })
}

//修改禁忌
export function taboodelete(query) {
  return request({
    url: 'autoSR/sensitivewords/delete',
    method:'get',
    params:query
  })
}

//顾问排班列表
export function AgentPoollist(query) {
  return request({
    url: 'autoSR/zkAgentPool/list',
    method:'get',
    params:query
  })
}

//查询顾问
export function agentListSort(query) {
  return request({
    url: 'autoSR/zkAgentPool/agentListSort',
    method:'get',
    params:query
  })
}


//排班删除
export function agentListdelete(query) {
  return request({
    url: 'autoSR/zkAgentPool/delete',
    method:'get',
    params:query
  })
}

//排班批量删除
export function agentListdelBatch(query) {
  return request({
    url: 'autoSR/zkAgentPool/delBatch',
    method:'get',
    params:query
  })
}

//排班添加
export function agentListsortUpdate(data) {
  return request({
    url: 'autoSR/zkAgentPool/sortUpdate',
    method:'post',
    data
  })
}

//排班批量删除
export function agentListupdate(query) {
  return request({
    url: 'autoSR/zkAgentPool/update',
    method:'get',
    params:query
  })
}


// 总览


//获取楼盘下部门
export function overviewfindList(query) {
  return request({
    url: 'admin/dept/findListByUser',
    method:'get',
    params:query
  })
}

//获取楼盘下顾问
export function overviewfindUserListByHouseId(query) {
  return request({
    url: 'autoSR/cushouseuserrelationmid/findUserListByHouseId',
    method:'get',
    params:query
  })
}

//接待总览顶部卡片数据
export function overviewreceptionOverview(query) {
  return request({
    url: 'autoSR/cusStageStatistics/receptionOverview',
    method:'get',
    params:query
  })
}

//接待总览折线图数据
export function overviewreceptionData(query) {
  return request({
    url: 'autoSR/cusStageStatistics/receptionData',
    method:'get',
    params:query
  })
}


//团队或者员工销讲趋势
export function overviewteamOrAccountSellingTrends(query) {
  return request({
    url: 'autoSR/cusStageStatistics/teamOrAccountSellingTrends',
    method:'get',
    params:query
  })
}


//接待量或者接待时长排名
export function overviewreceptionRanking(query) {
  return request({
    url: 'autoSR/cusStageStatistics/receptionRanking',
    method:'get',
    params:query
  })
}


//销讲词执行率
export function overviewreceptionOverviewZxl(query) {
  return request({
    url: 'autoSR/cusStageStatistics/receptionOverviewZxl',
    method:'get',
    params:query
  })
}


//趋势分析
export function trendtrendAnalysis(query) {
  return request({
    url: 'autoSR/cusStageStatistics/trendAnalysis',
    method:'get',
    params:query
  })
}

//项目
export function trendtrendAnalysisProject(query) {
  return request({
    url: 'autoSR/cusStageStatistics/trendAnalysisProject',
    method:'get',
    params:query
  })
}

//获取顾问
export function trendAnalysisAllAccount(query) {
  return request({
    url: 'autoSR/cusStageStatistics/trendAnalysisAllAccount',
    method:'get',
    params:query
  })
}

//顾问维度
export function trendAnalysisAccount(query) {
  return request({
    url: 'autoSR/cusStageStatistics/trendAnalysisAccount',
    method:'get',
    params:query
  })
}

//获取一级二级
export function trendAnalysisAllLevel(query) {
  return request({
    url: 'autoSR/cusStageStatistics/trendAnalysisAllLevel',
    method:'get',
    params:query
  })
}


//销讲二级
export function trendAnalysisLevel2(query) {
  return request({
    url: 'autoSR/cusStageStatistics/trendAnalysisLevel2',
    method:'get',
    params:query
  })
}


//团队对比表格
export function teamteamTable(query) {
  return request({
    url: 'autoSR/cusStageStatistics/teamTable',
    method:'get',
    params:query
  })
}

//团队对比图表
export function teamData(query) {
  return request({
    url: 'autoSR/cusStageStatistics/teamData',
    method:'get',
    params:query
  })
}

//团队对比一级
export function teamAllLevel(query) {
  return request({
    url: 'autoSR/cusStageStatistics/teamAllLevel',
    method:'get',
    params:query
  })
}


//楼盘对比表格
export function houseTable(query) {
  return request({
    url: 'autoSR/cusStageStatistics/houseTable',
    method:'get',
    params:query
  })
}

//楼盘对比图表
export function houseData(query) {
  return request({
    url: 'autoSR/cusStageStatistics/houseData',
    method:'get',
    params:query
  })
}


// 顾问能力
export function getAccount(query) {
  return request({
    url: 'autoSR/cusStageStatistics/getAccount',
    method:'get',
    params:query
  })
}

// 顾问能力
export function accountData(query) {
  return request({
    url: 'autoSR/cusStageStatistics/accountData',
    method:'get',
    params:query
  })
}



// 获取转写内容
export function findByCusIdcusId(query) {
  return request({
    url: 'autoSR/customer/findByCusId',
    method:'get',
    params:query
  })
}


// 获取客户信息
export function personalReceptionRecord(query) {
  return request({
    url: 'autoSR/customer/personalReceptionRecord',
    method:'get',
    params:query
  })
}

// 获取系统分析
export function findCARKeywords(query) {
  return request({
    url: 'autoSR/matchKeywords/findSystemAnalysis',
    method:'get',
    params:query
  })
}


// 获取人工校准
export function findSystemAnalysis(query) {
  return request({
    url: 'autoSR/matchKeywords/findManualCalibration',
    method:'get',
    params:query
  })
}


// 获取销讲违禁执行
export function findBannedWordsByCusId(query) {
  return request({
    url: 'autoSR/customer/findBannedWordsByCusId',
    method:'get',
    params:query
  })
}

// 标记顾问
export function markConsultant(query) {
  return request({
    url: 'autoSR/zk/file/markConsultant',
    method:'get',
    params:query
  })
}
// 标记顾问
export function toMatchKeywords(query) {
  return request({
    url: 'autoSR/matchKeywords/toMatchKeywords',
    method:'get',
    params:query
  })
}

//加入常错词
export function addCorrectWord(obj) {
  return request({
    url: 'autoSR/zk/correct/addCorrectWord',
    method: 'post',
    data: obj
  })
}

//保存校准
export function updateManualCalibration(obj) {
  return request({
    url: 'autoSR/customer/updateManualCalibration',
    method: 'post',
    data: obj
  })
}

// 录音文件列表
export function filefindByPage(obj) {
  return request({
    url: 'autoSR/zk/file/findByPage',
    method: 'post',
    data: obj
  })
}

// 接待标记
export function updateValidInvalid(obj) {
  return request({
    url: 'autoSR/customer/updateValidInvalid',
    method: 'post',
    data: obj
  })
}


// 加精
export function addATD(obj) {
  return request({
    url: 'autoSR/customer/addATD',
    method: 'post',
    data: obj
  })
}

//取消加精
export function delATD(query) {
  return request({
    url: 'autoSR/customer/delATD',
    method: 'get',
    params:query
  })
}


//音频下载
export function filedownload(query) {
  return request({
    url: 'autoSR/zk/file/filedownload',
    method: 'get',
    params:query
  })
}


//获取文本优化
export function findText(query) {
  return request({
    url: 'autoSR/zk/text/findText',
    method: 'get',
    params:query
  })
}



// 文本优化
export function saveText(obj) {
  return request({
    url: 'autoSR/zk/text/saveText',
    method: 'post',
    data: obj
  })
}

// 搜索
export function keyWordsMatching(obj) {
  return request({
    url: 'autoSR/customer/keyWordsMatching',
    method: 'post',
    data: obj
  })
}


//小程序权限
export function geTmenu(query) {
  return request({
    url: '/admin/menu/apiTree',
    method: 'get',
    params:query
  })
}

