// 科目对应的颜色
export const subjectToColor = (subject)=>{
    switch(subject){
        case '班主任':
            return { name: subject, color: '#6A8AEC' }
        case '语文':
            return { name: subject, color: '#91CC75' }
        case '数学':
            return { name: subject, color: '#FAC858' }
        case '英语':
            return { name: subject, color: '#EE6666' }
        case '物理':
            return { name: subject, color: '#817BE2' }
        case '化学':
            return { name: subject, color: '#73C0DE' }
        case '生物':
            return { name: subject, color: '#3BA272' }
        case '政治':
            return { name: subject, color: '#63A1FF' }
        case '历史':
            return { name: subject, color: '#FC8452' }
        case '地理':
            return { name: subject, color: '#9A60B4' }
        case '道法':
            return { name: subject, color: '#FF869D' }
        default:
            return { name: subject, color: '#C495FA' }
    }
}



// 试题类型状态转换
export const qustionTypeToName = (type)=>{
    switch(Number(type)){
        case 0:
            return '单选题'
        case 1:
            return '多选题'
        case 2:
            return '问答题'
        case 3:
            return '评分单选题'
        case 5:  //4
            return '评价题'
    }
}


//  evaluationStatus: number   //评价状态  0-待评价  1-进行中  2-已评价

type QuestionnaireStatus  = 'done' | 'pending' | 'unfinish' | string
// 科目教师问卷评价进度 状态转换
export const fillOutStatusToColor = (status:number|string)=>{
    switch(Number(status)){
        case 2:
            return {color:'#2BC644',label:'已完成',statusName:'已评价'}
        case 1:
            return {color:'#2E64FA',label:'进行中',statusName:'进行中'}
        case 0:
            return {color:'#999999',label:'未完成',statusName:'待评价'}
    }
}



// studentAnswerStatus  //题目的填写状态   学生答题是否完成   0 否  1 是
// 按题填写的 试题 是否处于已完成状态
export const IsSplitQuestionnaireFinish = (status)=>{
    return Number(status) === 1
}

