import request from '@/utils/request';

// 列表
export function alarmOrderList(data) {
  var params = Object.keys(data).map(function(key) {
    return encodeURIComponent(key) + '=' + encodeURIComponent(data[key]);
  }).join('&');
  return request({
    url: '/alarm_order?' + params,
    method: 'get',
  });
}
// 新增
export function alarmOrderStore(data) {
  return request({
    url: '/alarm_order',
    method: 'post',
    data: data,
  });
}
// 更新
export function alarmOrderUpdate(data, id) {
  return request({
    url: '/alarm_order/order_ok?id=' + id,
    method: 'post',
    data,
  });
}
// 删除
export function alarmOrderDestroy(id) {
  return request({
    url: '/alarm_order/' + id,
    method: 'delete',
  });
}
// 派单人员列表
export function alarmOrderUsers() {
  return request({
    url: '/alarm_order/user',
    method: 'get',
  });
}
// 工单详情
export function alarmOrderDetail(id) {
  return request({
    url: '/alarm_order/show?id=' + id,
    method: 'get',
  });
}
