import request from '@/utils/request'

// 查询服务订单列表
export function listOrder(query) {
  return request({
    url: '/system/Order/list',
    method: 'get',
    params: query
  })
}

// 查询服务订单详细
export function getOrder(id) {
  return request({
    url: '/system/Order/' + id,
    method: 'get'
  })
}

// 新增服务订单
export function addOrder(data) {
  return request({
    url: '/system/Order',
    method: 'post',
    data: data
  })
}

// 修改服务订单
export function updateOrder(data) {
  return request({
    url: '/system/Order',
    method: 'put',
    data: data
  })
}

// 删除服务订单
export function delOrder(id) {
  return request({
    url: '/system/Order/' + id,
    method: 'delete'
  })
}

// 获取接单记录列表
export function getReceiveRecords(orderId) {
  return request({
    url: '/system/Order/receive-records/' + orderId,
    method: 'get'
  })
}
getUserDataList () {
  getUserDataList().then(response => {
    this.userDataList = response.data
  })
},
// 获取通话记录列表
export function getCallRecords(orderId) {
  return request({
    url: '/system/Order/call-records/' + orderId,
    method: 'get'
  })
}

// 获取通话记录列表
export function getCommentRecords(orderId) {
  return request({
    url: '/system/Order/comment-records/' + orderId,
    method: 'get'
  })
}




// 获取录音文件列表
export function getAudioRecords(orderId) {
  return request({
    url: '/system/Order/audio-records/' + orderId,
    method: 'get'
  })
}

// 获取通知记录列表
export function getNotifyRecords(orderId) {
  return request({
    url: '/system/Order/notify-records/' + orderId,
    method: 'get'
  })
}
