import request from '@/utils/request'

// 查询岗位配置列表
export function listPostConfig(query) {
  return request({
    url: '/system/postConfig/list',
    method: 'get',
    params: query
  })
}

// 查询岗位配置列表
export function pcTreeList() {
  return request({
    url: '/system/postConfig/pcTreeList',
    method: 'get'
  })
}

// 查询岗位配置详细
export function getPostConfig(id) {
  return request({
    url: '/system/postConfig/' + id,
    method: 'get'
  })
}

// 新增岗位配置
export function addPostConfig(data) {
  return request({
    url: '/system/postConfig',
    method: 'post',
    data: data
  })
}

// 修改岗位配置
export function updatePostConfig(data) {
  return request({
    url: '/system/postConfig',
    method: 'put',
    data: data
  })
}

// 删除岗位配置
export function delPostConfig(id) {
  return request({
    url: '/system/postConfig/' + id,
    method: 'delete'
  })
}

// 导出岗位配置
export function exportPostConfig(query) {
  return request({
    url: '/system/postConfig/export',
    method: 'get',
    params: query
  })
}
