import request from '@/utils/request'

// 查询列表
export function listContract(query) {
  return request({
    url: '/personnel/relations/contract/page',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getContract(dictId) {
  return request({
    url: '/personnel/relations/contract/get?id=' + dictId,
    method: 'get'
  })
}

// 新增
export function addContract(data) {
  return request({
    url: '/personnel/relations/contract/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateContract(data) {
  return request({
    url: '/personnel/relations/contract/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delContract(dictId) {
  return request({
    url: '/personnel/relations/contract/delete?id=' + dictId,
    method: 'delete'
  })
}

// 导出
export function exportContract(query) {
  return request({
    url: '/personnel/relations/contract/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}