primaryDM-resolver-mixins.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. export default {
  2. methods: {
  3. primaryDMResolver(gen,active) {
  4. const models = this.generation.activeModels.find(item => item.generation == gen).models
  5. const generation = this.generation.activeModels.find(item => item.generation == gen).generation
  6. this.formatRows.forEach(item => {
  7. // item.applyCount = `${item.actualCount}/${item.personCount}`
  8. // item.rankInGroup = item.rankInGroup
  9. const currentGroup = models.find(group => group.groupId == item.groupId) || {}
  10. item.prmarySituation = currentGroup.groupIndicator
  11. // 录取人数加指标/ 设置人数
  12. if(currentGroup.groupIndicator >= 0) {
  13. item.applyCount = `${currentGroup.groupApprovedCount + currentGroup.groupIndicator} /${currentGroup.personCount}`
  14. }else {
  15. item.applyCount = `${currentGroup.groupApprovedCount} /${currentGroup.personCount}`
  16. }
  17. })
  18. console.log(active)
  19. if(active < 4){
  20. return {
  21. applyCount:{
  22. label:'选科人数比'
  23. },
  24. prmarySituation:{
  25. label:'超/缺',
  26. slot: 'underOver'
  27. },
  28. rankInGroup:{
  29. label:'当前组合实时排名'
  30. },
  31. rankInGrade:{
  32. label:'选科全校排名'
  33. }
  34. }
  35. }else {
  36. return {
  37. }
  38. }
  39. }
  40. }
  41. }