import request from '@/config/axios'

// 创建
export const createEmployee = (data) => {
  return request.post({ url: '/admin-api/oa/employee/create', data, isSubmitForm: true })
}

// 修改
export const updateEmployee = (data) => {
  return request.put({ url: '/admin-api/oa/employee/update', data })
}

//  修改状态
export const updateEmployeeStatus = (data) => {
  return request.put({ url: '/admin-api/oa/employee/status/update', data })
}

// 分页
export const getEmployeePage = (params) => {
  return request.get({ url: '/admin-api/oa/employee/page', params })
}

// 详情
export const getEmployeeDetail = (id) => {
  return request.get({ url: '/admin-api/oa/employee/get', params: { id } })
}

// 删除
export const deleteEmployee = (id) => {
  return request.delete({ url: '/admin-api/oa/employee/delete', params: { id } })
}
