Ver código fonte

选科报名--字段修改

shilipojs 2 anos atrás
pai
commit
cdb8a6a35d

+ 15 - 18
src/views/system/user/profile/components/ai-round-select-resolvers/backTracking-ai-resolver-mixins.js

@@ -1,34 +1,31 @@
 export default {
   methods: {
-    backTrackingResolver(gen,active) {
+    backTrackingResolver(gen, active) {
       console.log(gen)
       const models = this.generation.activeModels.find(item => item.generation == gen).models
       console.log(active)
       this.formatRows.forEach(item => {
         const currentGroup = models.find(group => group.groupId == item.groupId)
         console.log(currentGroup)
-        const groupIndicatorAll = models.reduce((prev,current)=> {
-          const groupIndicator = current.groupIndicator >= 0 ? 0 : ( - current.groupIndicator)
-          return prev + groupIndicator
-        },0)
-        item.groupIndicator = currentGroup.groupIndicator
+        const disenrollAll = Math.abs(models.sum(m => Math.min(0, m.nextGroupIndicator || 0)))
+        item.groupIndicator = currentGroup.nextGroupIndicator
         item.supplyBestIndicator = currentGroup.bestInIndicator || '/'
-        item.supplyRankInBest = currentGroup.rankInBest ? `${currentGroup.rankInBest}/${currentGroup.bestInIndicator}` : '/'
-        item.supplyRankInDisenroll = currentGroup.rankInDisenroll ? `${currentGroup.rankInDisenroll}/${groupIndicatorAll}`  : '/'
+        item.supplyRankInBest = currentGroup.allowSelect ? `${currentGroup.rankInBest}/${currentGroup.bestInIndicator}` : '/'
+        item.supplyRankInDisenroll = currentGroup.rankInDisenroll ? `${currentGroup.rankInDisenroll}/${disenrollAll}` : '/'
       })
-  return {
-        groupIndicator:{
-          label:'超缺',
-          slot:'underOver'
+      return {
+        groupIndicator: {
+          label: '超缺',
+          slot: 'underOver'
         },
-        supplyBestIndicator:{
-          label:'补录组合成绩最高人数'
+        supplyBestIndicator: {
+          label: '补录组合成绩最高人数'
         },
-        supplyRankInBest:{
-          label:'补录组合成绩最高人数排名'
+        supplyRankInBest: {
+          label: '补录组合成绩最高人数排名'
         },
-        supplyRankInDisenroll:{
-          label:'补录人数排名'
+        supplyRankInDisenroll: {
+          label: '补录人数排名'
         }
       }
     }

+ 1 - 1
src/views/system/user/profile/components/round-select-resolvers/finalAdjust-resolver-mixins.js

@@ -5,7 +5,7 @@ export default {
       const generation = this.generation.activeModels.find(item => item.generation == gen).generation
 
       this.formatRows.forEach(item => {
-        const currentGroup = models.find(group => group.groupId == item.groupId)
+        const currentGroup = models.find(group => group.groupId == item.groupId) || {}
 
         item.finalAdjustApply = `${currentGroup.actualCount + currentGroup.groupApprovedCount} /${currentGroup.personCount}`
       })