/**
 * CTI接口，获取坐席情况
 */
import request from '@/utils/request'

// 获取当前正在通话列表
// {success:true,totalProperty:1,
// root:[{"Call_pbxName":"spzc_pbx","Call_city":"","Call_isp":"中国联通","Call_number":"18513995803","Call_province":"北京","Call_callStatus":"接通","Call_id":"b7c32570-8acd-11ea-96b3-89e56eb1026b","Call_staySeconds":"8","Call_talkSeconds":"4","Call_ivrName":"座席组--客服","Call_agentName":"888","Call_otherLegNumber":"6001","Call_agentStaffid":"1","Call_sp_entityName":"Call"}]}
export function getCurrentCalls(params) {
  return request({
    // url: '/sound/list',
    url: '/server/invoke',
    method: 'post',
    data: {
      method: '/spcc/interface/json/calls.do.do',
      type: 'get',
      params: {
        username: 'Admin',
        password: 'admin'
      }
    }
  })
}
// 获取全部坐席情况列表
export function getSeatsState(params) {
  return request({
    url: '/server/invoke',
    method: 'get',
    params: {
      method: '/spcc/interface/json/agents.do.do',
      type: 'get',
      params: {
        username: 'Admin',
        password: 'admin'
      }
    }
  })
}

// 获取全部分机情况列表
export function getPhoneState(params) {
  return request({
    url: '/server/invoke',
    method: 'get',
    params: {
      method: '/spcc/interface/json/extensions.do.do',
      type: 'get',
      params: {
        username: 'Admin',
        password: 'admin'
      }
    }
  })
}
// 获取排队情况
export function getQueueState(params) {
  return request({
    url: '/server/invoke',
    method: 'get',
    params: {
      method: '/spcc/interface/json/queues.do.do',
      type: 'get',
      params: {
        username: 'Admin',
        password: 'admin'
      }
    }
  })
}

