import request from '@/utils/request'

// 查询救援的客户信息列表
export function listRescueCustomer(query) {
  return request({
    url: '/rescueCustomer/rescueCustomer/list',
    method: 'get',
    params: query
  })
}
// 查询救援的客户信息列表
export function driverlist(query) {
  return request({
    url: '/dept_driver/dept_driver/list',
    method: 'get',
    params: query
  })
}

// 查询救援的客户信息详细
export function getRescueCustomer(id) {
  return request({
    url: '/rescueCustomer/rescueCustomer/' + id,
    method: 'get'
  })
}

// 新增救援的客户信息
export function addRescueCustomer(data) {
  return request({
    url: '/rescueCustomer/rescueCustomer',
    method: 'post',
    data: data
  })
}

// 修改救援的客户信息
export function updateRescueCustomer(data) {
  return request({
    url: '/rescueCustomer/rescueCustomer',
    method: 'put',
    data: data
  })
}

// 删除救援的客户信息
export function delRescueCustomer(id) {
  return request({
    url: '/rescueCustomer/rescueCustomer/' + id,
    method: 'delete'
  })
}
//ai
export function getdeptTree() {
  return request({
    url: '/system/dept/list' ,
    method: 'get'
  })
}
export function driverList(data) {
  return request({
    url: '/system/rescueInfo/driverList' ,
    method: 'get',
    params: data
  })
}
// /dept_driver/dept_driver
export function dept_driver(data) {
  return request({
    url: '/dept_driver/dept_driver' ,
    method: 'post',
    data: data
  })
}
export function edept_driver(data) {
  return request({
    url: '/dept_driver/dept_driver' ,
    method: 'put',
    data: data
  })
}

export function delete_dept_driver(ids) {
  return request({
    url: '/dept_driver/dept_driver/' + ids ,
    method: 'delete',
  })
}
