import { asyncGetOptions } from '@/utils/global'
export const dataProcessing = (value) => {
  if (!value) {
    return '0亩';
  }
  if (value.indexOf('.') == -1) {
    return `${value}亩`;
  } else {
    if (value.split('.')[1].length <= 2) {
      return `${value}亩`;
    }
    const resultString = value.replace('㎡', '');
    return Number(resultString).toFixed(2) + '亩';
  }
};
export const dataProcessingCount = (value) => {
  if (!value) {
    return 0;
  }
  value = value.toString()
  if (value.indexOf('.') == -1) {
    return value;
  } else {
    if (value.split('.')[1].length <= 2) {
      return value;
    }
    const resultString = value.replace('㎡', '');
    return Number(resultString).toFixed(2);
  }
};
export const tubanlaiyuanOptions = await asyncGetOptions('wfydtbly');
