import request from '@/utils/request'

// 查询列表
export function listScheduling(query) {
  return request({
    url: '/personnel/attendance/scheduling-manage/page',
    method: 'get',
    params: query
  })
}

// 获取精简信息列表
export function listSimpleSchedulings() {
  return request({
    url: '/personnel/attendance/scheduling-manage/list',
    method: 'get'
  })
}

// 查询详细
export function getScheduling(postId) {
  return request({
    url: '/personnel/attendance/scheduling-manage/get?id=' + postId,
    method: 'get'
  })
}

// 新增
export function addScheduling(data) {
  return request({
    url: '/personnel/attendance/scheduling-manage/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateScheduling(data) {
  return request({
    url: '/personnel/attendance/scheduling-manage/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delScheduling(postId) {
  return request({
    url: '/personnel/attendance/scheduling-manage/delete?id=' + postId,
    method: 'delete'
  })
}

// 导出
export function exportScheduling(query) {
  return request({
    url: '/personnel/attendance/scheduling-manage/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
