import request from '@/utils/request'

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

// 查询详细
export function getProject(projectId) {
  return request({
    url: '/bracelet/project/' + projectId,
    method: 'get'
  })
}

// 新增
export function addProject(data) {
  return request({
    headers: { // 修改请求头
      'decrypt': 'decrypt',
      'Content-Type': 'multipart/form-data'
    },
    url: '/bracelet/project/addtemp',
    method: 'post',
    data: data
  })
}

// 修改
export function updateProject(data) {
  return request({
    headers: { // 修改请求头
      'decrypt': 'decrypt',
      'Content-Type': 'multipart/form-data'
    },
    url: '/bracelet/project',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delProject(projectId) {
  return request({
    url: '/bracelet/project/' + projectId,
    method: 'delete'
  })
}

// 导出
export function exportProject(query) {
  return request({
      url: '/bracelet/export/exportProject',
      method: 'get',
      responseType: 'blob',
      params: query
  })
}

  // 批量导出
export function exportProjectSome(query) {
  return request({
      url: '/bracelet/project/exportProjectSome',
      method: 'get',
      responseType: 'blob',
      params: query
  })
}
