import request from '@/utils/request'

// 查询业绩库列表
export function listPerformance(query) {
  return request({
    url: '/smartPlatform/performance/list',
    method: 'get',
    params: query
  })
}

// 新增业绩库
export function addPerformance(data) {
  return request({
    url: '/smartPlatform/performance/add',
    method: 'post',
    data: data
  })
}

// 查询业绩库详细
export function getPerformance(params) {
  return request({
    url: '/smartPlatform/performance/detail',
    method: 'get',
    params: params
  })
}

// 修改业绩库
export function updatePerformance(data) {
  return request({
    url: '/smartPlatform/performance/edit',
    method: 'post',
    data: data
  })
}

// 删除业绩库
export function delPerformance(data) {
  return request({
    url: '/smartPlatform/performance/delete',
    method: 'post',
    data: data
  })
}

// 查询业绩库下拉框
export function projectSelect() {
  return request({
    url: '/smartPlatform/performance/list',
    method: 'get'
  })
}

// 校验项目名称唯一性
export function checkProNameUnique(performance) {
  return request({
    url: '/smartPlatform/performance/checkProNameUnique',
    method: 'get',
    params: performance
  })
}
