import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取师傅列表
export function letterManagerListProject(data) {
  return request({
    url: `/letterManager/listProject?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function letterManagerListProjectExport(data, name) {
  return postBlob({
    url: '/letterManager/listProject/export',
    data,
    name
  })
}

export function letterManagerImportProject(data) {
  return handleImport('/letterManager/importProject', data.formdata, data.id || '')
}

export function letterManagerAddProject(data) {
  return request({
    url: '/letterManager/addProject',
    method: 'post',
    data: data
  })
}

export function letterManagerUpdateProject(data) {
  return request({
    url: '/letterManager/updateProject',
    method: 'post',
    data: data
  })
}

export function letterManagerDetailProject(params) {
  return request({
    url: '/letterManager/detailProject',
    method: 'post',
    params: params
  })
}

export function letterManagerDelProject(params) {
  return request({
    url: '/letterManager/delProject',
    method: 'post',
    params: params
  })
}
