import request from '@/axios';

export const getAllList = (params,page) => {
	let data = {}
	if(page){
		data={
		  ...params,
		  current:page.currentPage,
		  size:page.pageSize,
		}
	}else{
		data=params
	}
  return request({
    url: '/sf/operationSite/list',
    method: 'get',
		params: data
  })
}

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

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

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

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

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

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



