import axios from '@/libs/api.request'

export const getTableData = (url,query) => {
  console.log(url,"========================")
  return axios.request({
    url: url,
    method: 'post',
    data:query
  })
}
export const saveFormData = (url,data) => {
  return axios.request({
    url: url,
    method: 'post',
    data:data
  })
}
export const deleteData = (url,data) => {
  return axios.request({
    url: url,
    method: 'post',
    data:data
  })
}
export const bulkDeleteData = (url,data) => {
  return axios.request({
    url: url,
    method: 'post',
    data:data
  })
}



export const getDragList = () => {
  return axios.request({
    url: 'get_drag_list',
    method: 'get'
  })
}

export const errorReq = () => {
  return axios.request({
    url: 'error_url',
    method: 'post'
  })
}

export const saveErrorLogger = info => {
  return axios.request({
    url: 'save_error_logger',
    data: info,
    method: 'post'
  })
}

export const uploadImg = formData => {
  return axios.request({
    url: 'image/upload',
    data: formData
  })
}

export const getOrgData = () => {
  return axios.request({
    url: 'get_org_data',
    method: 'get'
  })
}

export const getTreeSelectData = () => {
  return axios.request({
    url: 'get_tree_select_data',
    method: 'get'
  })
}
