import request from '@/utils/request'

// 查询人员信息列表
export function listPerson(query) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/person/list',
    method: 'get',
    params: query
  })
}

// 查询人员信息详细
export function getPerson(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/person/' + id,
    method: 'get'
  })
}

// 新增人员信息
export function addPerson(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/person',
    method: 'post',
    data: data
  })
}

// 修改人员信息
export function updatePerson(data) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/person',
    method: 'put',
    data: data
  })
}

// 删除人员信息
export function delPerson(id) {
  request.defaults.baseURL = '/ezhizao-yzbh-sys'
  return request({
    url: '/business/person/' + id,
    method: 'delete'
  })
}
