export default {
  methods: {
    primaryResolver(gen,active) {
      const models = this.generation.activeModels.find(item => item.generation == gen).models
      const generation = this.generation.activeModels.find(item => item.generation == gen).generation

      this.formatRows.forEach(item => {
        // item.applyCount = `${item.actualCount}/${item.personCount}`
        // item.rankInGroup = item.rankInGroup
        const currentGroup = models.find(group => group.groupId == item.groupId)

        item.applyCount = `${currentGroup.actualCount} /${currentGroup.personCount}`
        item.rankInGroup = currentGroup.rankInGroup
        item.rankInGrade = currentGroup.rankInGrade
      })

      if(active < 4){
        return {
          applyCount:{
            label:'选科人数比'
          },
          rankInGroup:{
            label:'当前组合实时排名'
          },
          rankInGrade:{
            label:'选科全校排名'
          }
        }
      }else {
        return {

        }
      }

    }
  }
}
