import request from '@/utils/request'

export function index(params, isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/attendance/index',
    params,
    isLoading
  })
}

export function sign(params,isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/attendance/sign',
    params,
    isLoading
  })
}

export function updateSign(params, isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/attendance/update-sign',
    params,
    isLoading
  })
}

export function signIp(params,isLoading = true) {
  return request({
    method: 'get',
    url: '/api/oa/attendance/sign-ip',
    params,
    isLoading
  })
}
export function preIp(params, isLoading = false) {
  return request({
    method: 'get',
    url: '/api/oa/attendance/pre-ip',
    params,
    isLoading
  })
}

export function statistics(params,isLoading= true) {
  return request({
    method: 'get',
    url: '/api/oa/attendance/statistics',
    params,
    isLoading
  })
}

export function preDistance(params) {
  return request({
    method: 'get',
    url: '/api/oa/attendance/pre-distance',
    params
  })
}

export function leaveByYear(params) {
  return request({
    method: 'get',
    url: '/api/oa/statistics/leave-by-year',
    params
  })
}
