// 与业主关系
export const RELATION_SHIP = [
  {label: '业主', value: 'self'},
  {label: '租户', value: 'tenant'},
  {label: '亲人', value: 'relative'},
  {label: '朋友', value: 'friend'},
  {label: '其他', value: 'other'}
]

// 紧急程度
export const URGENT_DEGREE = [
  {label: '一般', value: 'usual'},
  {label: '紧急', value: 'urgent'}
]

// 是否定时发布
export const SCHEDULED_RELEASE = [
  {label: '是', value: 1},
  {label: '否', value: 0}
]

// 公告状态
export const NOTICE_STATUS = [
  {label: '已发布', value: 'published'},
  {label: '待发布', value: 'waitPublish'}
]

// 付费周期
export const CHARGING_CYCLE = [
  {label: '每月', value: '1'},
  {label: '每季度', value: '2'},
  {label: '每年', value: '3'},
  {label: '一次性付清', value: '4'},
  {label: '预付', value: '5'}
]

// 物业对账审核状态
export const COMPANY_AUDIT_STATUS = [
  {label: '物业待审核', value: 'companyWaitAudit'},
  {label: '物业审核通过', value: 'companyAuditPass'},
  {label: '物业审核驳回', value: 'companyRefuse'}
]

// 总平台对账审核状态
export const CENTRAL_AUDIT_STATUS = [
  {label: '总平台待审核', value: 'centralWaitAudit'},
  {label: '总平台审核通过', value: 'centralAuditPass'},
  {label: '总平台审核驳回', value: 'centralRefuse'}
]

/**
 * 翻译字段值对应的文本
 * @param children
 * @returns string
 */
export function filterDictTextByStatic(dictList, value) {
  if(!dictList || dictList.length === 0){
    return;
  }
  let obj = dictList.find(item=>item.value == value)
  return obj ? obj.label : ''
}