import request from '@/utils/httpRequest'

export default class RosterService {
  list (params) {
    return request({
      url: '/roster/base/list',
      method: 'get',
      params: params
    })
  }
  queryById (id) {
    return request({
      url: '/roster/base/queryById',
      method: 'get',
      params: {id: id}
    })
  }
  queryAllSupervisor () {
    return request({
      url: '/roster/base/queryAllSupervisor',
      method: 'get',
      params: {}
    })
  }
  save (inputForm) {
    return request({
      url: `/roster/base/save`,
      method: 'post',
      data: inputForm
    })
  }
  delete (ids) {
    return request({
      url: '/roster/base/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  template () {
    return request({
      url: '/roster/base/import/template',
      method: 'get',
      responseType: 'blob'
    })
  }
  importExcel (data) {
    return request({
      url: '/roster/base/import',
      method: 'post',
      data: data
    })
  }
  exportFile (params) {
    return request({
      url: '/roster/base/exportFile',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
}
