Pārlūkot izejas kodu

选科查询--我的选科表-分页

shilipojs 3 gadi atpakaļ
vecāks
revīzija
2b2641bf53

+ 9 - 9
mock/modules/elective-subject.js

@@ -68,7 +68,7 @@ module.exports = [
             models: [
               {
                 scoreSumGroup: 521,
-                groupIndicator: 30,
+                groupIndicator: 300,
                 bestInIndicator: 20,
                 rankInBest: 16,
                 rankInIndicator: 10,
@@ -94,7 +94,7 @@ module.exports = [
 
               {
                 scoreSumGroup: 548,
-                groupIndicator: 30,
+                groupIndicator: 200,
                 bestInIndicator: 20,
                 rankInBest: 16,
                 rankInIndicator: 10,
@@ -202,7 +202,7 @@ module.exports = [
                 rankInDisenroll: 14,
                 isRecommend: true,
 
-                groupId: 5,
+                groupId: 6,
                 groupName: '历生地',
                 classCount: 3,
                 personCount: 150,
@@ -360,7 +360,7 @@ module.exports = [
                 rankInDisenroll: 14,
                 isRecommend: true,
 
-                groupId: 5,
+                groupId: 6,
                 groupName: '历生地',
                 classCount: 3,
                 personCount: 150,
@@ -518,7 +518,7 @@ module.exports = [
                 rankInDisenroll: 14,
                 isRecommend: true,
 
-                groupId: 5,
+                groupId: 6,
                 groupName: '历生地',
                 classCount: 3,
                 personCount: 150,
@@ -676,7 +676,7 @@ module.exports = [
                 rankInDisenroll: 14,
                 isRecommend: true,
 
-                groupId: 5,
+                groupId: 6,
                 groupName: '历生地',
                 classCount: 3,
                 personCount: 150,
@@ -834,7 +834,7 @@ module.exports = [
                 rankInDisenroll: 14,
                 isRecommend: true,
 
-                groupId: 5,
+                groupId: 6,
                 groupName: '历生地',
                 classCount: 3,
                 personCount: 150,
@@ -992,7 +992,7 @@ module.exports = [
                 rankInDisenroll: 14,
                 isRecommend: true,
 
-                groupId: 5,
+                groupId: 6,
                 groupName: '历生地',
                 classCount: 3,
                 personCount: 150,
@@ -1150,7 +1150,7 @@ module.exports = [
                 rankInDisenroll: 14,
                 isRecommend: false,
 
-                groupId: 5,
+                groupId: 6,
                 groupName: '历生地',
                 classCount: 3,
                 personCount: 150,

+ 9 - 3
src/api/webApi/elective/selected-subject.js

@@ -27,12 +27,18 @@ export function getPrimaryElectivesModels(params) {
   })
 }
 
-
+// 学生获取选科状态数据,得到是每个组合最终状态和结果
+export function getStudentSelected() {
+  return request({
+    url: '/front/elective/enroll/getStudentSelected',
+    method: 'get',
+  })
+}
 
 // 学生获取选科状态数据,得到是每个组合最终状态和结果
-export function getModels(params) {
+export function getStudentElectiveModels(params) {
   return request({
-    url: '/mock/front/elective/enroll/getStudentElectiveModels',
+    url: '/mock/front/elective/studentElectiveModels',
     method: 'get',
     params
   })

+ 11 - 6
src/views/career/subject/components/select-subjec-report.vue

@@ -12,6 +12,8 @@
       </template>
     </mx-table>
     <mx-table v-if="activeType == 2" :propDefines="recomProp" :rows="recommendMajor"></mx-table>
+    <pagination :total="pageForm.total" :autoScroll="false" @pagination="onChangePage" :page.sync="pageForm.pageNum"
+                :limit.sync="pageForm.pageSize"></pagination>
   </div>
 </template>
 
@@ -34,7 +36,6 @@ export default {
   },
   watch: {
     activeType:{
-      immediate:true,
       handler(value) {
         console.log('change',value)
         if(value == 2) {
@@ -107,8 +108,9 @@ export default {
           slot:'select',
         }
       },
-      params: {
+      pageForm: {
         pageNum:1,
+        total: 0,
         pageSize: 10
       }
     };
@@ -117,6 +119,11 @@ export default {
     this.activeType=this.type
   },
   methods: {
+    onChangePage(page){
+      this.pageForm.pageSize = page.limit;
+      this.pageForm.pageNum = page.page;
+      this.getXkcxlist();
+    },
     getOptionalMajors() {
       getOptionalMajors().then(res => {
         this.optionalMajors = res.data
@@ -132,17 +139,15 @@ export default {
       const stat = this.activeType == 0 ? {collect:true} : {isSelectCourse:true,}
       xkcxlist({
         querySource: this.querySource,
-        ...this.params,
+        ...this.pageForm,
         ...stat
 
       }).then(res => {
         this.collectList = res.rows
+        this.pageForm.total = res.total
         console.log(res)
       })
     },
-    handleClick() {
-
-    }
   },
 };
 </script>

+ 21 - 5
src/views/system/user/profile/components/report-table.vue

@@ -181,6 +181,7 @@ export default {
       }
     },
     resolveTableSuffix() {
+
       return {
         allowSelectTips: {
           label: '报名状态'
@@ -209,12 +210,27 @@ export default {
       }
     },
     resolveDynamicTable() {
-      const resolverKey = this.generation.activeOpt.key + 'Resolver'
-      const resolver = this[resolverKey]
-      if (typeof resolver === 'function') {
-        return resolver()
+      const options = this.generation.options
+      if (!options || !this.generation.active) return {}
+      const optValues = Object.values(options)
+      const dynamicColumns = {}
+      for (let gen = options.primary.value; gen <= this.generation.active ; gen++) {
+        const opt = optValues.find(opt => opt.value == gen)
+        const resolverKey = opt.key + 'Resolver'
+        const resolver = this[resolverKey]
+        if (typeof resolver === 'function') {
+          const genColumns = resolver(gen)
+          Object.assign(dynamicColumns, genColumns)
+        }
       }
-      return {}
+      console.log('resolveDynamicTable',dynamicColumns)
+      return dynamicColumns
+    },
+    formatRows() {
+      if(!this.selectObj?.groupIds) return []
+      return this.selectObj.groupIds.split(',').map(item => {
+        groupId: item
+      })
     },
     formatCols() {
       return {

+ 27 - 22
src/views/system/user/profile/components/round-select-resolvers/backTracking-resolver-mixins.js

@@ -1,30 +1,35 @@
 export default {
   methods: {
-    backTrackingResolver() {
-      const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 3)
-      // 激活状态的row初始化
-      this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
-        item.subjects = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => item.majorCategoryName)
-        item.colleges = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => {
-          return {
-            college: item.collegeName,
-            major: item.majorCategoryName
-          }
-        })
-        item.applyCount = `${item.actualCount + item.groupApprovedCount}/${item.personCount}`
-        item.prmarySituation = item.actualCount + item.groupApprovedCount - item.personCount
-        item.allowSelectTips = item.prmarySituation >= 0 ? '已满' : '可报名'
-
-        return item
-      })
+    backTrackingResolver(gen) {
+      // const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 3)
+      // const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
+      // const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
+      // // 激活状态的row初始化
+      // this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
+      //   item.subjects = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => item.majorCategoryName)
+      //   item.colleges = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => {
+      //     return {
+      //       college: item.collegeName,
+      //       major: item.majorCategoryName
+      //     }
+      //   })
+      //   console.log(primaryDMModels)
+      //   const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //   console.log(index)
+      //   item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
+      //   item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
+      //   item.allowSelectTips = item.prmarySituation >= 0 ? '已满' : '可报名'
+      //   item.prmarySituation = item.prmarySituation >= 0 ? '' : `缺${-item.prmarySituation }`
+      //   return item
+      // })
 
       return {
         applyCount:{
-          label:'选科人数比'  // 初录结束的人数比
+          label:'初录选科人数比'  // 初录结束的人数比
         },
         prmarySituation:{
           label:'超/缺'  // 现阶段的超缺

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

@@ -1,36 +1,36 @@
 export default {
   methods: {
     backTrackingDMResolver() {
-      const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 4)
-      const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
-      const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
-      this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
-        item.subjects = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => item.majorCategoryName)
-        item.colleges = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => {
-          return {
-            college: item.collegeName,
-            major: item.majorCategoryName
-          }
-        })
-        // 补录结果字段
-        item.supplyRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
-        item.supplyIndicator = item.groupApprovedCount + item.actualCount-item.personCount
-        item.allowSelectTips = item.supplyIndicator >= 0 ? '已满' : '可报名'
-        // 初录的字段
-        const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
-        console.log(primaryDMModels)
-        console.log(index)
-
-        item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
-        item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
-
-        return item
-      })
-      console.log(primaryDMIndex)
+      // const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 4)
+      // const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
+      // const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
+      // this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
+      //   item.subjects = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => item.majorCategoryName)
+      //   item.colleges = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => {
+      //     return {
+      //       college: item.collegeName,
+      //       major: item.majorCategoryName
+      //     }
+      //   })
+      //   // 补录结果字段
+      //   item.supplyRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
+      //   item.supplyIndicator = item.groupApprovedCount + item.actualCount-item.personCount
+      //   item.allowSelectTips = item.supplyIndicator >= 0 ? '已满' : '可报名'
+      //   // 初录的字段
+      //   const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //   console.log(primaryDMModels)
+      //   console.log(index)
+      //
+      //   item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
+      //   item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
+      //   item.prmarySituation = item.prmarySituation >= 0 ? '' : `缺${-item.prmarySituation }`
+      //   return item
+      // })
+      // console.log(primaryDMIndex)
       return {
         applyCount:{
           label:'初录情况'

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

@@ -1,35 +1,36 @@
 export default {
   methods: {
     finalAdjustResolver() {
-      const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 5)
-      const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
-      const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
-      this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
-        item.subjects = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => item.majorCategoryName)
-        item.colleges = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => {
-          return {
-            college: item.collegeName,
-            major: item.majorCategoryName
-          }
-        })
-        // 补录结果字段
-        item.supplyRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
-        item.supplyIndicator = item.groupApprovedCount + item.actualCount-item.personCount
-        item.allowSelectTips = item.supplyIndicator >=0 ? '已满' : '可报名'
-        // 初录的字段
-        const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
-        console.log(primaryDMModels)
-        console.log(index)
-
-        item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
-        item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
-
-        return item
-      })
+      // const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 5)
+      // const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
+      // const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
+      // this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
+      //   item.allowSelectTips = item.allowSelect ? '可报名' : '不可报名'
+      //   item.subjects = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => item.majorCategoryName)
+      //   item.colleges = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => {
+      //     return {
+      //       college: item.collegeName,
+      //       major: item.majorCategoryName
+      //     }
+      //   })
+      //   // 补录结果字段
+      //   item.supplyRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
+      //   item.supplyIndicator = item.groupApprovedCount + item.actualCount-item.personCount
+      //
+      //   // 初录的字段
+      //   const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //   console.log(primaryDMModels)
+      //   console.log(index)
+      //
+      //   item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
+      //   item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
+      //
+      //   return item
+      // })
       return {
         applyCount:{
           label:'初录情况'

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

@@ -1,42 +1,42 @@
 export default {
   methods: {
     finalAdjustDMResolver() {
-      const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 6)
-      const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
-      const backDMIndex = this.generation.activeModels.findIndex(item => item.generation == 4)
-
-      const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
-      const backDMModels = this.generation.activeModels[backDMIndex].models
-
-      this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
-        item.subjects = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => item.majorCategoryName)
-        item.colleges = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => {
-          return {
-            college: item.collegeName,
-            major: item.majorCategoryName
-          }
-        })
-        // 二次补录结果字段
-        item.towSupplyRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
-        item.towSupplyIndicator = item.groupApprovedCount + item.actualCount-item.personCount
-        item.allowSelectTips = item.towSupplyIndicator >=0 ? '已满' : '可报名'
-
-        // 补录结果字段
-        const supplyIndex = backDMModels.findIndex(primary => primary.groupId == item.groupId )
-        item.supplyRecord = `${backDMModels[supplyIndex].groupApprovedCount + backDMModels[supplyIndex].actualCount} / ${backDMModels[supplyIndex].personCount}`
-        item.supplyIndicator = backDMModels[supplyIndex].groupApprovedCount + backDMModels[supplyIndex].actualCount-backDMModels[supplyIndex].personCount
-
-        // 初录的字段
-        const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
-        item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
-        item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
-
-        return item
-      })
+      // const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 6)
+      // const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
+      // const backDMIndex = this.generation.activeModels.findIndex(item => item.generation == 4)
+      //
+      // const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
+      // const backDMModels = this.generation.activeModels[backDMIndex].models
+      //
+      // this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
+      //   item.subjects = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => item.majorCategoryName)
+      //   item.colleges = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => {
+      //     return {
+      //       college: item.collegeName,
+      //       major: item.majorCategoryName
+      //     }
+      //   })
+      //   // 二次补录结果字段
+      //   item.towSupplyRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
+      //   item.towSupplyIndicator = item.groupApprovedCount + item.actualCount-item.personCount
+      //   item.allowSelectTips = item.towSupplyIndicator >=0 ? '已满' : '可报名'
+      //
+      //   // 补录结果字段
+      //   const supplyIndex = backDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //   item.supplyRecord = `${backDMModels[supplyIndex].groupApprovedCount + backDMModels[supplyIndex].actualCount} / ${backDMModels[supplyIndex].personCount}`
+      //   item.supplyIndicator = backDMModels[supplyIndex].groupApprovedCount + backDMModels[supplyIndex].actualCount-backDMModels[supplyIndex].personCount
+      //
+      //   // 初录的字段
+      //   const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //   item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
+      //   item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
+      //
+      //   return item
+      // })
       return {
         applyCount:{
           label:'初录情况'

+ 44 - 45
src/views/system/user/profile/components/round-select-resolvers/forceAdjust-resolver-mixins.js

@@ -1,51 +1,50 @@
 export default {
   methods: {
     forceAdjustResolver() {
-      console.log(1111111111111111)
-      const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 7)
-      const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
-      const backDMIndex = this.generation.activeModels.findIndex(item => item.generation == 4)
-      const towBackDMIndex = this.generation.activeModels.findIndex(item => item.generation == 6)
-
-      const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
-      const backDMModels = this.generation.activeModels[backDMIndex].models
-      const towBackDMModels = this.generation.activeModels[towBackDMIndex].models
-
-      this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
-        item.subjects = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => item.majorCategoryName)
-        item.colleges = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => {
-          return {
-            college: item.collegeName,
-            major: item.majorCategoryName
-          }
-        })
-        //  调剂结果字段
-        item.adjustRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
-        item.adjustIndicator = item.groupApprovedCount + item.actualCount-item.personCount
-        item.allowSelectTips = item.adjustIndicator >=0 ? '已满' : '可报名'
-        // 二次补录结果字段
-        const towSupplyIndex = towBackDMModels.findIndex(primary => primary.groupId == item.groupId )
-
-        item.towSupplyRecord = `${towBackDMModels[towSupplyIndex].groupApprovedCount + towBackDMModels[towSupplyIndex].actualCount} / ${towBackDMModels[towSupplyIndex].personCount}`
-        item.towSupplyIndicator = towBackDMModels[towSupplyIndex].groupApprovedCount + towBackDMModels[towSupplyIndex].actualCount-towBackDMModels[towSupplyIndex].personCount
-
-
-        // 补录结果字段
-        const supplyIndex = backDMModels.findIndex(primary => primary.groupId == item.groupId )
-        item.supplyRecord = `${backDMModels[supplyIndex].groupApprovedCount + backDMModels[supplyIndex].actualCount} / ${backDMModels[supplyIndex].personCount}`
-        item.supplyIndicator = backDMModels[supplyIndex].groupApprovedCount + backDMModels[supplyIndex].actualCount-backDMModels[supplyIndex].personCount
-
-        // 初录的字段
-        const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
-        item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
-        item.prmarySituation = primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount - primaryDMModels[index].personCount
-
-        return item
-      })
+      // console.log(1111111111111111)
+      // const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 7)
+      // const primaryDMIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
+      // const backDMIndex = this.generation.activeModels.findIndex(item => item.generation == 4)
+      // const towBackDMIndex = this.generation.activeModels.findIndex(item => item.generation == 6)
+      //
+      // const primaryDMModels = this.generation.activeModels[primaryDMIndex].models
+      // const backDMModels = this.generation.activeModels[backDMIndex].models
+      // const towBackDMModels = this.generation.activeModels[towBackDMIndex].models
+      //
+      // this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
+      //   item.allowSelectTips = item.allowSelect ? '可报名' : item.disabledReason || '不可报名'
+      //   item.subjects = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => item.majorCategoryName)
+      //   item.colleges = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => {
+      //     return {
+      //       college: item.collegeName,
+      //       major: item.majorCategoryName
+      //     }
+      //   })
+      //   //  调剂结果字段
+      //   item.adjustRecord = `${item.groupApprovedCount + item.actualCount} / ${item.personCount}`
+      //   item.adjustIndicator = item.groupIndicator
+      //
+      //   // 二次补录结果字段
+      //   const towSupplyIndex = towBackDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //
+      //   item.towSupplyRecord = `${towBackDMModels[towSupplyIndex].groupApprovedCount + towBackDMModels[towSupplyIndex].actualCount} / ${towBackDMModels[towSupplyIndex].personCount}`
+      //   item.towSupplyIndicator = towBackDMModels[towSupplyIndex].groupIndicator
+      //
+      //
+      //   // 补录结果字段
+      //   const supplyIndex = backDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //   item.supplyRecord = `${backDMModels[supplyIndex].groupApprovedCount + backDMModels[supplyIndex].actualCount} / ${backDMModels[supplyIndex].personCount}`
+      //   item.supplyIndicator = backDMModels[supplyIndex].groupIndicator
+      //   // 初录的字段
+      //   const index = primaryDMModels.findIndex(primary => primary.groupId == item.groupId )
+      //   item.applyCount = `${primaryDMModels[index].actualCount + primaryDMModels[index].groupApprovedCount}/${primaryDMModels[index].personCount}`
+      //   item.prmaryIndicator = primaryDMModels[index].groupIndicator
+      //   return item
+      // })
       return {
         applyCount:{
           label:'初录情况'

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

@@ -1,31 +1,31 @@
 export default {
   methods: {
-    primaryResolver() {
-      const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 1)
-      // 激活状态的row初始化
-      this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
-        item.allowSelectTips = item.allowSelect ? '报名中' : '无法报名'
-        item.subjects = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => item.majorCategoryName)
-        item.colleges = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => {
-          return {
-            college: item.collegeName,
-            major: item.majorCategoryName
-          }
-        })
-
-
-        return item
-      })
-
-
-      this.formatRows = this.formatRows.map(item => {
-        item.applyCount = `${item.actualCount}/${item.personCount}`
-        return item
-      })
+    primaryResolver(gen) {
+      // const models = this.generation.activeModels.find(item => item.generation == gen)
+      // // 激活状态的row初始化
+      // models.map(item => {
+      //   item.allowSelectTips = item.allowSelect ? '报名中' : '无法报名'
+      //   item.subjects = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => item.majorCategoryName)
+      //   item.colleges = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => {
+      //     return {
+      //       college: item.collegeName,
+      //       major: item.majorCategoryName
+      //     }
+      //   })
+      //
+      //
+      //   return item
+      // })
+      //
+      //
+      // this.formatRows = this.formatRows.map(item => {
+      //   item.applyCount = `${item.actualCount}/${item.personCount}`
+      //   return item
+      // })
 
       return {
         applyCount:{

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

@@ -1,27 +1,27 @@
 export default {
   methods: {
     primaryDMResolver() {
-      const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
-      this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
-        item.subjects = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => item.majorCategoryName)
-        item.colleges = this.optionalMajors.filter(college => {
-          if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
-        }).map(item => {
-          return {
-            college: item.collegeName,
-            major: item.majorCategoryName
-          }
-        })
-        return item
-      })
-      this.formatRows = this.formatRows.map(item => {
-        item.applyCount = `${item.actualCount + item.groupApprovedCount}/${item.personCount}`
-        item.prmarySituation = item.actualCount + item.groupApprovedCount - item.personCount
-        item.allowSelectTips = item.prmarySituation >= 0 ? '已满' : '可报名'
-        return item
-      })
+      // const activeIndex = this.generation.activeModels.findIndex(item => item.generation == 2)
+      // this.formatRows = this.generation.activeModels[activeIndex].models.map(item => {
+      //   item.subjects = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => item.majorCategoryName)
+      //   item.colleges = this.optionalMajors.filter(college => {
+      //     if (college.matchedGroupIds.indexOf(item.groupId) != -1) return college.majorCategoryName
+      //   }).map(item => {
+      //     return {
+      //       college: item.collegeName,
+      //       major: item.majorCategoryName
+      //     }
+      //   })
+      //   return item
+      // })
+      // this.formatRows = this.formatRows.map(item => {
+      //   item.applyCount = `${item.actualCount + item.groupApprovedCount}/${item.personCount}`
+      //   item.prmarySituation = item.actualCount + item.groupApprovedCount - item.personCount
+      //   item.allowSelectTips = item.prmarySituation >= 0 ? '已满' : '可报名'
+      //   return item
+      // })
       return {
         applyCount:{
           label:'选科人数比'

+ 7 - 9
src/views/system/user/profile/round-select.vue

@@ -105,7 +105,7 @@
 </template>
 
 <script>
-import { getStudentSelected, saveStudentSelected } from '@/api/webApi/selection'
+import {  saveStudentSelected } from '@/api/webApi/selection'
 import TestEntry from '@/views/elective/test/components/test-entry'
 import TestResult from '@/views/elective/test/components/test-result'
 import SelectSubject from '@/views/system/user/profile/components/select-subject'
@@ -113,12 +113,12 @@ import ReportTable from '@/views/system/user/profile/components/report-table'
 import ElectiveGenerationSteps from '@/views/elective/generation/components/elective-generation-steps'
 import config from '@/common/mx-config'
 import {
-  getModels,
+  getStudentElectiveModels,
   getOptionalMajors,
+  getStudentSelected,
   getPrimaryElectivesModels,
   getRecommendMajor
 } from '@/api/webApi/elective/selected-subject'
-
 export default {
   provide() {
     return {
@@ -156,9 +156,6 @@ export default {
       generationModels: []
     }
   },
-  created() {
-    // this.getData()
-  },
   computed: {
     currentOpt() {
       /// 当前进程代对应的配置项,可能没有值
@@ -191,7 +188,7 @@ export default {
         options: this.stepOptions,
         current: this.selectObj.currentGeneration,
         currentOpt: this.currentOpt,
-        active: this.active,
+        active: this.activeOpt?.value,
         activeOpt: this.activeOpt,
         status: {
           ...this.selectObj,
@@ -219,8 +216,8 @@ export default {
     this.getRecommendMajor()
   },
   methods: {
-    getModels() {
-      getModels().then(res => {
+    getStudentElectiveModels() {
+      getStudentElectiveModels().then(res => {
         this.generationModels =res.data
       })
     },
@@ -248,6 +245,7 @@ export default {
         const selectStatus = res.data.selectResult
         selectStatus.currentGeneration = 7 // 当前所处的状态
         selectStatus.preferenceCount = 3 // 志愿数
+        selectStatus.groupIds = selectStatus.groupIds || '1,2,3,4,5,6'
         this.selectObj = selectStatus
         this.allowSelect = res.data.allowSelect
         this.form.groupId = this.selectObj?.groupId