backTracking-ai-resolver-mixins.js 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. export default {
  2. methods: {
  3. backTrackingResolver(gen, active) {
  4. const models = this.generation.activeModels.find(item => item.generation == gen)?.models || []
  5. this.formatRows.forEach(item => {
  6. const currentGroup = models.find(group => group.groupId == item.groupId)
  7. console.log(currentGroup)
  8. const disenrollAll = Math.abs(models.sum(m => Math.min(0, m.nextGroupIndicator || 0)))
  9. item.groupIndicator = currentGroup.nextGroupIndicator
  10. item.supplyBestIndicator = currentGroup.bestInIndicator || '/'
  11. item.supplyRankInBest = (!currentGroup.approved && !currentGroup.forceAdjusted)? `${currentGroup.rankInBest}/${currentGroup.bestInIndicator}` : '/'
  12. item.supplyRankInDisenroll = currentGroup.rankInDisenroll ? `${currentGroup.rankInDisenroll}/${disenrollAll}` : '/'
  13. })
  14. return {
  15. groupIndicator: {
  16. label: '补录剩余计划'
  17. },
  18. supplyBestIndicator: {
  19. label: '补录组合成绩最高人数'
  20. },
  21. supplyRankInBest: {
  22. label: '补录组合成绩最高人数排名'
  23. },
  24. supplyRankInDisenroll: {
  25. label: '补录人数排名'
  26. }
  27. }
  28. }
  29. }
  30. }