import request from '@/utils/request'

// 获得每日考勤信息分页
export function listInfoDaily(query) {
  return request({
    url: '/personnel/attendance/info/dailyPage',
    method: 'get',
    params: query
  })
}

// 获得月度考勤信息分页
export function listInfoMonthly(query) {
  return request({
    url: '/personnel/attendance/info/monthlyPage',
    method: 'get',
    params: query
  })
}


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

// 查询详细
export function getInfo(dictId) {
  return request({
    url: '/personnel/attendance/info/get?id=' + dictId,
    method: 'get'
  })
}

// 新增
export function addInfo(data) {
  return request({
    url: '/personnel/attendance/info/create',
    method: 'post',
    data: data
  })
}

// 修改
export function updateInfo(data) {
  return request({
    url: '/personnel/attendance/info/update',
    method: 'put',
    data: data
  })
}

// 删除
export function delInfo(dictId) {
  return request({
    url: '/personnel/attendance/info/delete?id=' + dictId,
    method: 'delete'
  })
}

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

// 导出每日
export function exportInfoDaily(query) {
  return request({
    url: '/personnel/attendance/info/export-daily-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 导出每月
export function exportInfoMonthly(query) {
  return request({
    url: '/personnel/attendance/info/export-monthly-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}