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("resultStatus", value => {
  const resultStatus = ["考试中", "呼叫中", "已签到", "未签到", "录播中", "已完成"]
  return resultStatus[value]
})

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