shilipojs 3 роки тому
батько
коміт
f4da0edaf2

+ 3 - 1
doc/Mind/PrimaryElective.cs

@@ -17,6 +17,7 @@ namespace mxdemo.Mind
         //  "beginTime": "2022-02-16",
         //  "endTime": "2022-02-17",
         //  "groupIds": "1,2,3,10,11,12",
+        public int currentGeneration; // 当前报名状态
         public int preferenceCount; // 选填志愿数量
 
   //  "groupList": [
@@ -152,9 +153,10 @@ namespace mxdemo.Mind
 
         // 返回学生测评推荐专业以及匹配情况
         List<RecommendMajor> getRecommendMajor();
-        /**
+        /*
           AI分析
           需要的字段:
+          详细见analysis.json
            score   组合成绩
            remainingPlan   剩余计划
            highestScoreCount  组合成绩最高人数

+ 149 - 0
doc/Mind/analysis.json

@@ -0,0 +1,149 @@
+// Al分析
+[
+  {
+    // 组合成绩最高人数
+    name: '组合成绩最高人数',
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '80',
+            description: '剩余计划'
+          }
+        ]
+      }
+    ]
+  },
+  {
+    name: '组合成绩最高人数排名,',
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '3',
+            description: '组合成绩最高人数排名'
+          },
+          {
+            key: '',
+            value: '50',
+            description: '组合成绩最高人数'
+          }
+        ]
+      }
+    ]
+  },
+  {
+    // 初录结果时返回的字段
+    name: '补录剩余计划', // 动态字段名称
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '80',
+            description: '剩余计划'
+          }
+        ]
+      }
+    ]
+  },
+  {
+    name: '补录人数排名,',
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '3',
+            description: '补录人数排名'
+          },
+          {
+            key: '',
+            value: '50',
+            description: '补录人数'
+          }
+        ]
+      }
+    ]
+  },
+  {
+    // 布录结果时 追加
+    name: '二次补录剩余计划', // 动态字段名称
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '80',
+            description: '剩余计划'
+          }
+        ]
+      }
+    ]
+  },
+  {
+    // 布录结果时 追加
+    name: '二次补录人数排名,',
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '3',
+            description: '二次补录人数排名'
+          },
+          {
+            key: '',
+            value: '50',
+            description: '二次补录人数'
+          }
+        ]
+      }
+    ]
+  },
+  {
+    // 二次布录结果时 追加
+    name: '调剂补录剩余计划', // 动态字段名称
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '80',
+            description: '调剂补录剩余计划'
+          }
+        ]
+      }
+    ]
+  },
+  {
+    // 二次补录结果时 追加
+    name: '调剂人数排名,',
+    groupDescriptors: [
+      {
+        groupId: 1,
+        descriptors: [
+          {
+            key: '',
+            value: '3',
+            description: '调剂补录人数排名'
+          },
+          {
+            key: '',
+            value: '50',
+            description: '调剂补录人数'
+          }
+        ]
+      }
+    ]
+  }
+]

+ 150 - 85
mock/modules/elective-subject.js

@@ -109,7 +109,6 @@ module.exports = [
               groupName: '物化生', // 名称
               classCount: 5,  // 班级数
               personCount: 200,  // 限制人数
-              personInTime: 100,  // 实时人数
               rankInGroup: 53, // 选科实时排名
               rankInGrade: 64, // 选科全校排名
               allowSelect: true, // 是否可以报名
@@ -122,7 +121,6 @@ module.exports = [
               groupName: '物化政', // 名称
               classCount: 4,  // 班级数
               personCount: 180,  // 限制人数
-              personInTime: 60,  // 实时人数
               rankInGroup: 32, // 选科实时排名
               rankInGrade: 67, // 选科全校排名
               allowSelect: true, // 是否可以报名
@@ -135,7 +133,6 @@ module.exports = [
               groupName: '历化政', // 名称
               classCount: 3,  // 班级数
               personCount: 180,  // 限制人数
-              personInTime: 60,  // 实时人数
               rankInGroup: 32, // 选科实时排名
               rankInGrade: 67, // 选科全校排名
               allowSelect: true, // 是否可以报名
@@ -148,7 +145,6 @@ module.exports = [
               groupName: '历化地', // 名称
               classCount: 4,  // 班级数
               personCount: 180,  // 限制人数
-              personInTime: 60,  // 实时人数
               rankInGroup: 32, // 选科实时排名
               rankInGrade: 67, // 选科全校排名
               allowSelect: true, // 是否可以报名
@@ -158,87 +154,156 @@ module.exports = [
             },
           ],
           statColumns: [
-            {
-              name: '补录选科人数比',
-              groupDescriptors: [
-                {
-                  groupId: 1,
-                  descriptors: [
-                    {
-                      key: '',
-                      value: 80,
-                      description: '补录确定人数'
-                    },
-                    {
-                      key: '',
-                      value: 200,
-                      description: '补录人数'
-                    }
-                  ]
-                },
-                {
-                  groupId: 2,
-                  descriptors: [
-                    {
-                      key: '',
-                      value: 60,
-                      description: '补录确定人数'
-                    },
-                    {
-                      key: '',
-                      value: 200,
-                      description: '补录人数'
-                    }
-                  ]
-                },
-                {
-                  groupId: 3,
-                  descriptors: [
-                    {
-                      key: '',
-                      value: 100,
-                      description: '补录确定人数'
-                    },
-                    {
-                      key: '',
-                      value: 200,
-                      description: '补录人数'
-                    }
-                  ]
-                },
-                {
-                  groupId: 4,
-                  descriptors: [
-                    {
-                      key: '',
-                      value: 115,
-                      description: '补录确定人数'
-                    },
-                    {
-                      key: '',
-                      value: 200,
-                      description: '补录人数'
-                    }
-                  ]
-                },
-                {
-                  groupId: 5,
-                  descriptors: [
-                    {
-                      key: '',
-                      value: 126,
-                      description: '补录确定人数'
-                    },
-                    {
-                      key: '',
-                      value: 200,
-                      description: '补录人数'
-                    }
-                  ]
-                },
-              ]
-            }
-          ]
+              {
+                // 初录报名时动态追加此字段
+                name: '初录选科人数比', // 动态字段名称
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: '80',
+                        description: '初录报名人数'
+                      },
+                      {
+                        key: '',
+                        value: '200',
+                        description: '组合设置人数'
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                // 初录结果追加
+                name: '初录超/缺',
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: '超61',
+                        description: ''
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                // 补录结果追加
+                name: '补录选科人数比',
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: 10,
+                        description: '补录选科人数'
+                      },
+                      {
+                        key: '',
+                        value: 15,
+                        description: '需要补录人数'
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                // 补录结果追加
+                name: '补录超/缺',
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: '超61',
+                        description: ''
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                // 二次补录结果追加
+                name: '二次补录选科人数比',
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: 10,
+                        description: '二次补录选科人数'
+                      },
+                      {
+                        key: '',
+                        value: 15,
+                        description: '需要二次补录人数'
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                // 二次补录结果追加
+                name: '二次补录超/缺',
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: '缺31',
+                        description: ''
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                // 调剂结果追加
+                name: '调剂选科人数比',
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: 10,
+                        description: '调剂选科人数'
+                      },
+                      {
+                        key: '',
+                        value: 15,
+                        description: '需要调剂人数'
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                // 调剂结果追加
+                name: '调剂超/缺',
+                groupDescriptors: [
+                  {
+                    groupId: 1,
+                    descriptors: [
+                      {
+                        key: '',
+                        value: '缺31',
+                        description: ''
+                      }
+                    ]
+                  }
+                ]
+              }
+            ]
+
         }
       }
     }

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

@@ -12,10 +12,6 @@
         <span class="btn-green">查看记录</span>
         <!--        <el-button>查看</el-button>-->
       </template>
-      <template #proportion="{row}">
-        <span :style="{color: row.personInTime > row.personCount ? 'red' : '#42b983'}">{{ row.personInTime }}</span>
-        <span>/{{ row.personCount }}</span>
-      </template>
       <template #signUp="{row}">
         <span class="btn-red" v-if="row.selected" @click="toUnSelect(row)">取消报名</span>
         <span class="btn-green" v-else @click="toSelect(row)">报名</span>
@@ -105,8 +101,10 @@ export default {
         const prop = 'statistic_' + index
         statCols[prop] = { label: column.name }
         rows.forEach((row) => {
-          const descriptors = column.groupDescriptors.find(desc => desc.groupId == row.groupId) || []
-          row[prop] = `${descriptors.descriptors[0].value} / ${descriptors.descriptors[1].value}`
+          const descriptors = column.groupDescriptors.find(desc => desc.groupId == row.groupId) ?
+            column.groupDescriptors.find(desc => desc.groupId == row.groupId).descriptors : []
+            console.log(descriptors)
+           row[prop] = descriptors.length > 0 ?  descriptors.length > 1 ? `${descriptors[0].value}/${descriptors[1].value}` : `${descriptors[0].value}`  : ''
         })
       })
       const cols = {
@@ -123,17 +121,13 @@ export default {
         personCount: {
           label: '人数设置'
         },
-        proportion: {
-          label: '选科人数比', // personInTime/personCount 实时人数/人数设置 = 选科人数比
-          slot: 'proportion'
-        },
+        ...statCols,
         rankInGroup: {
           label: '当前组合实时排名'
         },
         rankInGrade: {
           label: '选科全校排名'
         },
-        ...statCols,
         allowSelect: {
           label: '报名状态'
         },