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

export function getFormId (params) {
  return httpPost('PF/Form/Get', params)
}
export function genSystemCode (params) {
  return httpPost('PF/CodeRule/GenSystemCode', params)
}

export function releasePreUseSerial (params) {
  return httpPost('PF/CodeRule/ReleasePreUseSerial', params)
}

export function getBtnList (params) {
  return httpPost('PF/Btn/OrderEntities', params)
}
export function getEntities (params) {
  return httpPost('PF/Query/OrderEntities', params)
}

export function getTableEntities (params) {
  return httpPost('PF/PageTable/FullEnitity', params)
}
export function getTreeCloum (params) {
  return httpPost('PF/PageTree/Get', params)
}
export function getFormByRedis (params) {
  return httpGet('PF/Form/GetByRedis', params)
}
export function deleteItem (url, params) {
  return httpGet(url, params)
}

export function deleteItemBatch (url, params) {
  return httpGet(url, params)
}

export function getTableData (params) {
  return httpPost(params.url, params.payload, false)
}
export function getDataByPost (url, params, onlyData = true, ignoreThrottle = false, isIgnoreTenant = false) {
  return httpPost(url, params, onlyData, ignoreThrottle, undefined, isIgnoreTenant)
}
export function getDataByGet (url, params, onlyData = true) {
  return httpGet(url, params, onlyData)
}

export function getEnums (params) {
  return httpGet('PF/Extend/Enum', params)
}

export function acceptNotification (params) {
  return httpPost('FM/Notification/AcceptedNotifi', params)
}

export function getAllEnum (params) {
  return httpGet('PF/Extend/GetAllEnum', params)
}

export function addLoginOut (params) {
  //return httpPost('PF/SysLog/AddLoginOut', params)
}
export function addAddLog (params) {
  //return httpPost('PF/SysLog/AddAddLog', params)
}
export function addEditLog (params) {
  //return httpPost('PF/SysLog/AddEditLog', params)
}
export function addDeleteLog (params) {
  //return httpPost('PF/SysLog/AddDeleteLog', params)
}
export function addOtherLog (params) {
  //return httpPost('PF/SysLog/AddOtherLog', params)
}
export function operateLog (params) {
  //return httpPost('LG/LGOperate/Add', params)
}
export function getServerList (params) {
  return httpPost(params.url, { ...params.payload })
}
export function getCurrVer (params) {
  return httpPost('PF/VersionManage/GetCurrVer', params)
}

export function getRedisValue (params) {
  return httpPost('PF/Redis/GetValue', params.payload)
}

export function setRedisValue (params) {
  return httpPost('PF/Redis/SetValue', params.payload)
}
