import request from '@/utils/httpRequest'

export default class JobPositionService {
  list (params) {
    return request({
      url: '/job/job_position/list',
      method: 'get',
      params: params
    })
  }
  save (inputForm) {
    return request({
      url: `/job/job_position/save`,
      method: 'post',
      data: inputForm
    })
  }
  delete (ids) {
    return request({
      url: '/job/job_position/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  queryById (id) {
    return request({
      url: '/job/job_position/queryById',
      method: 'get',
      params: {id: id}
    })
  }
  getJobPositionByOff (id) {
    return request({
      url: '/job/job_position/getJobPositionByOff',
      method: 'get',
      params: {id: id}
    })
  }
  queryAllPosition () {
    return request({
      url: '/job/job_position/queryAllPosition',
      method: 'get',
      params: {}
    })
  }
  queryAllOffice () {
    return request({
      url: '/job/job_position/queryAllOffice',
      method: 'get',
      params: {}
    })
  }
  changeUseFlag (ids, useFlag) {
    return request({
      url: '/job/job_position/changeUseFlag/' + useFlag,
      method: 'post',
      params: {ids: ids}
    })
  }
  importExcel (data) {
    return request({
      url: '/job/job_position/import',
      method: 'post',
      data: data
    })
  }
  exportTemplate () {
    return request({
      url: '/job/job_position/import/template',
      method: 'get',
      responseType: 'blob'
    })
  }
  exportExcel (params) {
    return request({
      url: '/job/job_position/export',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
}
