import http from '../utils/http'

/**
 * 员工管理
 */
// 组织架构list
export const apiOrganizationList = data => {
  return http({ url: '/lz_management/staff/structure/list', method: 'post', data })
}

// 员工列表
export const apiEmployeesList = params => {
  return http({ url: '/lz_management/staff/info/list', method: 'get', params })
}

// 员工档案
export const apiEmployeesInfo = data => {
  return http({ url: '/lz_management/staff/info/query/' + data, method: 'post' })
}

// 员工概况
export const apiEmployeessItuation = data => {
  return http({ url: '/lz_management/staff/info/statistical', method: 'get', params: data })
}

// 文件上传
export const apiUploadFile = params => {
  return http({ url: '/lz_management/staff/info/batchImport', method: 'post', data: params })
}

// 导出文件
export const apiExportFile = params => {
  return http({ url: '/lz_management/staff/info/downloadTemplate', method: 'post', responseType: 'blob', data: params })
}

// 钉钉免登录
export const apiDingtalkLogin = data => {
  return http({ url: '/lz_management/dtlg/login', method: 'post', data })
}

// 钉钉抽奖登记
export const apiDingtalkLuck = data => {
  return http({ url: '/lz_management/dtlg/luck', method: 'post', data })
}

// 钉钉抽奖详情
export const apiGetLuck = params => {
  return http({ url: '/lz_management/luck/getLuckById', method: 'get',  params })
}

// 中将记录登记
export const apiUpdateLuck = data => {
  return http({ url: '/lz_management/luck/updateLuck', method: 'post', data })
}

// 钉钉抽奖详情
export const apiDingtalkJump = params => {
  return http({ url: '/lz_management/dtlg/jump', method: 'get',  params })
}