import request from '@/utils/request'

// 查询工作日设置列表
export function listCalholiday(query) {
  return request({
    url: "/mes/cal/calendar/list",
    method: "get",
    params: query,
  });
}

// 查询上班数据工作单元列表
export function listItem(query) {
  return request({
    url: "/md/cal/plan/workunit/list",
    method: "get",
    params: query,
  });
}

// 查询节假日设置详细
export function getCalholiday(holidayId) {
  return request({
    url: '/mes/cal/calholiday/' + holidayId,
    method: 'get'
  })
}

// 新增节假日设置
export function addCalholiday(data) {
  return request({
    url: "/md/cal/plan/workunit/editList",
    method: "put",
    data: data,
  });
}

// 修改节假日设置
export function updateCalholiday(data) {
  return request({
    url: '/mes/cal/calholiday',
    method: 'put',
    data: data
  })
}

// 删除节假日设置
export function delCalholiday(holidayId) {
  return request({
    url: '/mes/cal/calholiday/' + holidayId,
    method: 'delete'
  })
}
