import request from "@/util/oaRequest"

// 职级
export function listGrade(query) {
  return request({
    url: '/hrm/grade/list',
    method: 'get',
    params: query
  })
}

export function addGrade(data) {
  return request({
    url: '/hrm/grade',
    method: 'post',
    data
  })
}

export function updateGrade(data) {
  return request({
    url: '/hrm/grade',
    method: 'put',
    data
  })
}

export function delGrade(gradeIds) {
  return request({
    url: `/hrm/grade/${gradeIds}`,
    method: 'delete'
  })
}

// 岗位
export function listPosition(query) {
  return request({
    url: '/hrm/position/list',
    method: 'get',
    params: query
  })
}

export function addPosition(data) {
  return request({
    url: '/hrm/position',
    method: 'post',
    data
  })
}

export function updatePosition(data) {
  return request({
    url: '/hrm/position',
    method: 'put',
    data
  })
}

export function delPosition(positionIds) {
  return request({
    url: `/hrm/position/${positionIds}`,
    method: 'delete'
  })
}

