// 与业主关系
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 REPAIR_STATUS = [
  {label: '报单待审核', value: 'initiateWaitAudit'},
  {label: '报单审核驳回', value: 'initiateRefuse'},
  {label: '待派单', value: 'waitDispatch'},
  {label: '待接收', value: 'waitReceive'},
  {label: '维修中', value: 'inRepair'},
  {label: '回单待审核', value: 'finishWaitAudit'},
  {label: '回单审核驳回', value: 'finishRefuse'},
  {label: '已完成', value: 'finishAuditPass'}
]

// 费用计算公式
export const DESIGN_FORMULAS = [
  {label: '固定金额', value: 1},
  {label: '建筑面积 × 单价', value: 2},
  {label: '（本期度数 - 上期度数） × 单价', value: 3}
]

// 缴费状态
export const PAYMENT_STATUS = [
  {label: '待缴费', value: 'unPaid'},
  {label: '已缴费', value: 'paid'}
]

// 投诉状态
export const COMPLAINT_STATUS = [
  {label: '待处理', value: 'waitPending'},
  {label: '处理中', value: 'pending'},
  {label: '处理完成', value: 'finish'}
]

// 业委会职位
export const INDUSTRY_JOB = [
  {label: '业委会主任', value: 'labelCommitteeDirector'},
  {label: '业委会副主任', value: 'labelCommitteeDeputy'},
  {label: '委员', value: 'labelCommitteeMember'},
  {label: '文员', value: 'labelCommitteeClerk'}
]

// 投诉状态
export const OWNER_LEBEL = [
  {label: '留守儿童', value: 'labelDestituteEt'},
  {label: '留守老人', value: 'labelDestituteLr'},
  {label: '孤', value: 'labelDestituteGu'},
  {label: '寡', value: 'labelDestituteGua'},
  {label: '病', value: 'labelDestituteBing'},
  {label: '弱', value: 'labelDestituteRuo'},
  {label: '老', value: 'labelDestituteLao'},
  {label: '残', value: 'labelDestituteCan'}
]

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

// 小区对账审核状态
export const RECONCILIATION_STATUS = [
  {label: '小区待审核', value: 'communityWaitAudit'},
  {label: '小区审核通过', value: 'communityAuditPass'},
  {label: '小区审核驳回', value: 'communityRefuse'}
]

// 物业对账审核状态
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'}
]

// 分利对账审核状态
export const FENLICENTRAL_AUDIT_STATUS = [
  {label: '未对账', value: '1'},
  {label: '对账待审核', value: '2'},
  {label: '对账完成', value: '3'},
  {label: '对账拒绝', value: '4'}
]

// 分利对账結算状态
export const BALANCE_STATUS = [
  {label: '结算待审核', value: '2'},
  {label: '已结算', value: '3'},
  {label: '结算驳回', value: '4'}
]

// 支付详情
export const PAY_WAY = [
  {label: '抵扣物业费', value: 'payPropertyFee'},
  {label: '申请退款', value: 'refundOrder'},
  {label: '扫码支付', value: 'scanQrCodePay'}
]

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