import { httpPost, httpGet } from '../utils/request'

export function getSysFields (params, onlyData, ignoreThrottle) {
  return httpPost('PF/FormQuery/GetSearchConfigInfo', params, onlyData, ignoreThrottle)
}

export function getUserFields (params, onlyData, ignoreThrottle) {
  return httpPost('FM/UserCCQuery/OrderEntities', params, onlyData, ignoreThrottle)
}

export function getUserConfig (params) {
  return httpPost('FM/UserCCQuery/GetQueryFieldByUserQuery', params)
}

export function getQueryFields (params) {
  return httpPost('FM/UserCCQuery/GetQueryFields', params)
}

export function deleteUserConfig (params) {
  return httpGet('FM/UserCCQuery/FullDelete', params)
}

export function saveUserConfig (params) {
  return httpPost('FM/UserCCQuery/FullUpdate', params)
}

export function updateUserConfigIsDefault (params) {
  return httpPost('FM/UserCCQuery/UpdateIsDefault', params)
}

export function saveUserConfigFeildDefaultValue (params) {
  return httpPost('FM/UserCCQuery/SaveQueryFieldDefaultValue', params)
}
