import request from '@/utils/request'

// 查询目标协议列表
export function listTargetagreement(query) {
  return request({
    url: '/plant/targetagreement/list',
    method: 'get',
    params: query
  })
}

// 查询目标协议详细
export function getTargetagreement(id) {
  return request({
    url: '/plant/targetagreement/' + id,
    method: 'get'
  })
}

// 新增目标协议
export function addTargetagreement(data) {
  return request({
    url: '/plant/targetagreement',
    method: 'post',
    data: data
  })
}

// 修改目标协议
export function updateTargetagreement(data) {
  return request({
    url: '/plant/targetagreement',
    method: 'put',
    data: data
  })
}

// 生成经理目标协议
export function generateTargetagreement(data) {
  return request({
    url: '/plant/targetagreement/generate',
    method: 'put',
    data: data
  })
}

// 删除目标协议
export function delTargetagreement(id) {
  return request({
    url: '/plant/targetagreement/' + id,
    method: 'delete'
  })
}

// 导出目标协议
export function exportTargetagreement(query) {
  return request({
    url: '/plant/targetagreement/export',
    method: 'get',
    params: query
  })
}
