import request from '@/utils/request'

// 获取休息日列表数据
export function getRestDayLists(params) {
  return request({
    url: 'api/SetWorkOffDay/getlist',
    method: 'get',
    params
  })
}

// 设置休息日
export function setRestDay(data) {
  return request({
    url: 'api/SetWorkOffDay/setofforon',
    method: 'post',
    data
  })
}

// 获取上班时段列表数据
export function getWordDayLists(params) {
  return request({
    url: 'api/setworktime/getlistbypage',
    method: 'get',
    params
  })
}

// 获取上班时段数据
export function getWorkTime(id) {
  return request({
    url: 'api/setworktime/getdetails',
    method: 'get',
    params: {
      id
    }
  })
}

// 添加上班时段数据
export function addWorkTime(data) {
  return request({
    url: 'api/setworktime/add',
    method: 'post',
    data
  })
}

// 编辑上班时段数据
export function editWorkTime(data) {
  return request({
    url: 'api/setworktime/update',
    method: 'post',
    data
  })
}

// 删除上班时段数据
export function deleteWorkTime(ids) {
  return request({
    url: 'api/setworktime/delete',
    method: 'post',
    data: {
      ids
    }
  })
}
