export default {
  methods: {
    backTrackingDMResolver(gen) {
      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 => {
        const currentGroup = models.find(group => group.groupId == item.groupId)
        console.log(currentGroup.groupApprovedCount)
        console.log(currentGroup.groupIndicator)
        item.supplyIndicator =  currentGroup.groupIndicator
        // 录取人数加指标/ 设置人数
        if(currentGroup.groupIndicator >= 0) {
          item.supplyRecord = `${currentGroup.groupApprovedCount + currentGroup.groupIndicator} /${currentGroup.personCount}`
        }else {
          item.supplyRecord = `${currentGroup.groupApprovedCount} /${currentGroup.personCount}`
        }

      })


      return {
        applyCount:{
          label:'初录情况'
        },
        prmarySituation:{
          label:'初录超缺',
          slot: 'underOver'
        },
        supplyRecord:{
          label:'补录情况' // 补录情况 =
          // groupApprovedCount(补录阶段实际报名人数) + actualCount(补录本组合已被录取人数) / personCount（设置的人数）
        },
        supplyIndicator:{
          label:'补录结果', // 补录的超缺
          slot: 'underOver'
        }
      }
    }
  }
}
