import Vue from "vue"

// 乐团状态
Vue.filter("formatLevel", value => {
  const seriesItems = {
    0: "免考",
    1: "一级",
    2: "二级",
    3: "三级",
    4: "四级",
    5: "五级",
    6: "六级",
    7: "七级",
    8: "八级",
    9: "九级",
    10: "十级",
  }
  return seriesItems[value]
})

// 考试状态
Vue.filter("examStatus", value => {
  let templateStatus = {
    SETTING: "设置中",
    NOT_START: "未开始报名",
    APPLYING: "报名中",
    APPLIED: "报名结束",
    EXAM_ING: "考试中",
    EXAM_END: "考试结束",
    RESULT_CONFIRM: "确认考试结果",
    CLOSE: "关闭"
  }
  return templateStatus[value]
})

// 考试结果
Vue.filter("resultType", value => {
  const resultType = {
    EXCELLENT: '优秀',
    WELL: '良好',
    PASS: '及格',
    FAIL: '不及格',
  }
  return resultType[value]
})

// 支付状态
Vue.filter("studentPayStatus", value => {
  const template = {
    PAY_WAIT: '等待缴费',
    AUDIT_WAIT: '等待审核',
    AUDIT_PASS: '通过',
    AUDIT_REJECT: '拒绝',
    REFUNDED: '已退款'
  }
  return template[value]
})
