export default {
  methods: {
    primaryDMResolver(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.prmarySituation = currentGroup.groupIndicator
        // 录取人数加指标/ 设置人数
        if(currentGroup.groupIndicator >= 0) {
          item.applyCount = `${currentGroup.groupApprovedCount + currentGroup.groupIndicator} /${currentGroup.personCount}`
        }else {
          item.applyCount = `${currentGroup.groupApprovedCount} /${currentGroup.personCount}`
        }
  })
      console.log(active)
      if(active < 4){
        return {
          applyCount:{
            label:'选科人数比'
          },
          prmarySituation:{
            label:'超/缺',
            slot: 'underOver'
          },
          rankInGroup:{
            label:'当前组合实时排名'
          },
          rankInGrade:{
            label:'选科全校排名'
          }
        }
      }else {
        return {

        }
      }

    }
  }
}
