import request from '@/axios';

export const getList = (page, params) => {
  return request({
    url: '/sf/operationSiteEmployee/page',
    method: 'get',
    params: {
      ...params,
      current:page.currentPage,
      size:page.pageSize,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/sf/operationSiteEmployee/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const add = (row) => {
  return request({
    url: '/sf/operationSiteEmployee/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/sf/operationSiteEmployee/update',
    method: 'post',
    data: row
  })
}

export const updateStatus = (row) => {
  return request({
    url: '/sf/operationSiteEmployee/updateStatus',
    method: 'post',
    params: {
      id: row.id,
      status: row.status,
    },
  })
}

export const remove = (ids) => {
  return request({
    url: '/sf/operationSiteEmployee/remove',
    method: 'post',
    params: {
      id:ids,
    }
  })
}

export const editSiteEmpAuth = (params) => {
  return request({
    url: '/sf/operationSiteEmployee/editSiteEmpAuth',
    method: 'post',
    data: params
  })
}

