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

export function workerTeamList(data) {
  return request({
    url: `/worker/team/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function workerTeamListExport(data, name) {
  return postBlob({
    url: '/worker/team/list/export',
    data,
    name
  })
}

export function workerTeamAdd(data) {
  return request({
    url: `/worker/team/add`,
    method: 'post',
    data
  })
}

export function workerTeamUpdate(data) {
  return request({
    url: `/worker/team/update`,
    method: 'post',
    data
  })
}

export function workerTeamQueryWebsitWorker(params) {
  return request({
    url: `/worker/team/query/websit/worker`,
    method: 'post',
    params
  })
}

export function workerTeamImport(data) {
  return handleImport('/worker/team/import', data.formdata, data.id || '')
}
