import request from '@/utils/request'

// 查询隐患巡查工单列表
export function listOrder(query) {
  return request({
    url: '/mudu/order/list',
    method: 'get',
    params: query
  })
}

// 查询隐患巡查工单详细
export function getOrder(id) {
  return request({
    url: '/mudu/order/' + id,
    method: 'get'
  })
}

// 新增隐患巡查工单
export function addOrder(data) {
  return request({
    url: '/mudu/order',
    method: 'post',
    data: data
  })
}

// 修改隐患巡查工单
export function updateOrder(data) {
  return request({
    url: '/mudu/order',
    method: 'put',
    data: data
  })
}

// 删除隐患巡查工单
export function delOrder(id) {
  return request({
    url: '/mudu/order/' + id,
    method: 'delete'
  })
}
// 导入隐患巡查工单
export function importOrder(data) {
  return request({
    url: '/mudu/order/importExcel',
    method: 'post',
    headers:{
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data
  })
}
