export const queryFieldMethod = (columnName:string,queryStr:string)=>{
  const conditionJsonWhole:any[] = [];
  if(queryStr != ''){
    if(queryStr == null) queryStr = '';
    conditionJsonWhole.push({
      column:columnName,
      type:'eq',
      value:queryStr
    });
  }

  const s = encodeURIComponent(JSON.stringify(conditionJsonWhole));
  return ({
    conditionJson:s
  })
}

export const queryLikeFieldMethod = (columnName:string,queryStr:string,pageNum:number,pageSize:number)=>{
  const conditionJsonWhole:any[] = [];
  if(queryStr != ''){
    if(queryStr == null) queryStr = '';
    conditionJsonWhole.push({
      column:columnName,
      type:'like',
      value:queryStr
    });
  }

  const s = encodeURIComponent(JSON.stringify(conditionJsonWhole));
  return ({
    conditionJson:s,
    pageNum,
    pageSize
  })
}
export const queryLikeFieldMethod2 = (columnName:string,queryStr:string)=>{
  const conditionJsonWhole:any[] = [];
  if(queryStr != ''){
    if(queryStr == null) queryStr = '';
    conditionJsonWhole.push({
      column:columnName,
      type:'like',
      value:queryStr
    });
  }

  const s = encodeURIComponent(JSON.stringify(conditionJsonWhole));
  return ({
    conditionJson:s
  })
}