import request from '@/utils/request'

// 查询列表
export function listSupervisionUnit(query) {
  return request({
    url: '/project/SupervisionUnit/listSupervisionUnit',
    method: 'get',
    params: query,
  })
}

// 修改
export function updateSupervisionUnit(data) {
  return request({
    url: '/project/SupervisionUnit/updateSupervisionUnit',
    method: 'put',
    data: data,
  })
}

// 删除
export function delSupervisionUnit(addressId) {
  return request({
    url: '/project/SupervisionUnit/delSupervisionUnit/' + addressId,
    method: 'delete',
  })
}

// 获取总监列表数据
export function getDirectorListApi(query) {
  return request({
    url: '/project/SupervisionUnit/listSupervisionUnitUser',
    method: 'get',
    params: query,
  })
}
// 新增总监
export function addDirectorInfoApi(data) {
  return request({
    url: '/project/pro/addSupervisoryUnit',
    method: 'post',
    data,
  })
}
// 修改总监
export function editDirectorInfoApi(data) {
  return request({
    url: '/project/SupervisionUnit/updateSupervisionUnitUser',
    method: 'post',
    data,
  })
}
// 删除总监
export function deleteDirectorInfoApi(addressId) {
  return request({
    url: '/project/SupervisionUnit/delSupervisionUnitUser/'+addressId,
    method: 'DELETE',
  //    params: {"id":addressId}
  })
}
