shilipojs 3 gadi atpakaļ
vecāks
revīzija
265dd0595c

+ 8 - 6
doc/Mind/PrimaryElective.cs

@@ -91,10 +91,12 @@ namespace mxdemo.Mind
         // 5.7 hht +字段,用来展示报告
         public int groupIndicator; // 组合指标 // primary时为设置人数,之后为决策完毕后剩余的设置数
         public int rankInIndicator; // 组合指标排名
+        public int rankInBest; // bestInIndicator中的排名
         public int rankInDisenroll; // 全组合指标排名,即所有未录取人员中的排名 // 可能没用
         public int bestInIndicator; // 未录取组合排名最优人数 // 这是一个解释数据,并没有直接参与计算
         public decimal scoreSumAll; // 9门成绩
         public decimal scoreSumGroup; // 6门成绩
+        public bool isRecommend; // 推荐组合
 
         public int rankInGroup; // 选科实时排名
         public int rankInGrade; // 选科全校排名
@@ -164,11 +166,11 @@ namespace mxdemo.Mind
 
         // 返回学生测评推荐专业以及匹配情况
         List<RecommendMajor> getRecommendMajor();
-        /*
-          AI分析
-          需要的字段:
-          详细见analysis.json
-        */
-        List<ElectiveSelectGroupStatistics> getAIAnalysis()
+//        /*
+//          AI分析
+//          需要的字段:
+//          详细见analysis.json
+//        */
+//        List<ElectiveSelectGroupStatistics> getAIAnalysis()
     }
 }

+ 1 - 1
doc/Mind/analysis.json

@@ -33,7 +33,7 @@
     ]
   },
   {
-    name: '组合成绩最高人数排名,',
+    name: '组合成绩最高人数排名',
     groupDescriptors: [
       {
         groupId: 1,

+ 29 - 1
mock/modules/elective-subject.js

@@ -115,6 +115,13 @@ module.exports = [
               disabledReason: '不知道', // 不可报名时的原因
               selected:  false, // 报名状态
               selectedRank:  1, // 多志愿时的排序
+              scoreSumGroup: 514, // 6门成绩
+              groupIndicator: 30, // 组合剩余指标
+              bestInIndicator: 20, // 该组合成绩为学生最高成绩的学生人数
+              rankInBest: 19, // 该组合成绩为学生最高成绩的学生人数的排名
+              rankInIndicator: '', // 组合指标排名
+              rankInDisenroll: 14,// 全组合指标排名 如 补录人数排名
+              isRecommend: true , // 推荐专业
             },
             {
               groupId: 2, // 组合
@@ -127,6 +134,13 @@ module.exports = [
               disabledReason: '不知道', // 不可报名时的原因
               selected:  false, // 报名状态
               selectedRank:  2, // 多志愿时的排序
+              scoreSumGroup: 578, // 6门成绩
+              groupIndicator: 30, // 组合剩余指标
+              bestInIndicator: 20, // 该组合成绩为学生最高成绩的学生人数
+              rankInBest: 19, // 该组合成绩为学生最高成绩的学生人数的排名
+              rankInIndicator: '', // 组合指标排名
+              rankInDisenroll: 14,// 全组合指标排名 如 补录人数排名
+              isRecommend: false , // 推荐专业
             },
             {
               groupId: 3, // 组合
@@ -139,6 +153,13 @@ module.exports = [
               disabledReason: '不知道', // 不可报名时的原因
               selected:  false, // 报名状态
               selectedRank:  2, // 多志愿时的排序
+              scoreSumGroup: 549, // 6门成绩
+              groupIndicator: 30, // 组合剩余指标
+              bestInIndicator: 20, // 该组合成绩为学生最高成绩的学生人数
+              rankInBest: 19, // 该组合成绩为学生最高成绩的学生人数的排名
+              rankInIndicator: '', // 组合指标排名
+              rankInDisenroll: 14,// 全组合指标排名 如 补录人数排名
+              isRecommend: false , // 推荐专业
             },
             {
               groupId: 4, // 组合
@@ -147,10 +168,17 @@ module.exports = [
               personCount: 180,  // 限制人数
               rankInGroup: 32, // 选科实时排名
               rankInGrade: 67, // 选科全校排名
-              allowSelect: true, // 是否可以报名
+              allowSelect: false, // 是否可以报名
               disabledReason: '不知道', // 不可报名时的原因
               selected:  false, // 报名状态
               selectedRank:  2, // 多志愿时的排序
+              scoreSumGroup: 478, // 6门成绩
+              groupIndicator: 0, // 组合剩余指标
+              bestInIndicator: 0, // 该组合成绩为学生最高成绩的学生人数
+              rankInBest: 0, // 该组合成绩为学生最高成绩的学生人数的排名
+              rankInIndicator: '', // 组合指标排名
+              rankInDisenroll: 0,// 全组合指标排名 如 补录人数排名
+              isRecommend: false , // 推荐专业
             },
           ],
           statColumns: [

+ 124 - 0
src/views/system/user/profile/components/ai-analysis-dialog.vue

@@ -0,0 +1,124 @@
+<template>
+  <el-dialog
+    v-if="dialogVisible"
+    title="AI分析"
+    :visible.sync="dialogVisible"
+    width="80%"
+  >
+    <mx-table :propDefines="formatTable.cols" :rows="formatTable.rows">
+      <template #subjects="{row}">
+        <el-row>
+          <el-col :span="8" v-for="subject in row.subjects">
+            <el-tag type="success" class="mr10 mb10">{{ subject[0] }}</el-tag>
+          </el-col>
+        </el-row>
+      </template>
+      <template #group="{row}">
+        <span :class="{'f-primary': row.allowSelect,'f-red':!row.allowSelect}">{{row.groupName}}</span>
+      </template>
+      <template #colleges="{row}">
+        <el-row>
+          <el-col :span="12" v-for="college in row.colleges">
+            <el-tag type="success" class="mb10">{{ college.major[0] }}</el-tag>
+            :
+            <span>{{ college.college }}</span>
+          </el-col>
+        </el-row>
+      </template>
+      <template #report="{row}">
+        <el-button >查看</el-button>
+      </template>
+    </mx-table>
+    <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+      </span>
+  </el-dialog>
+</template>
+<script>
+import config from '@/common/mx-config'
+export default {
+  data() {
+    return{
+      dialogVisible:false,
+      tableInfo: {},
+    }
+  },
+  computed: {
+    steps() {
+      return config.electiveGenerationOptions
+    },
+    formatTable() {
+      if(!this.tableInfo) return {}
+      const cols = {
+        groupName: {
+          label: '科目组合',
+          width: '80',
+          slot:'group'
+        },
+        scoreSumGroup: {
+          label: '组合成绩',
+          width: '80'
+        },
+        groupIndicator: {
+          label: '剩余计划',
+          width: '80'
+        },
+        bestInIndicator: {
+          label: '组合成绩最高人数'
+        },
+        rankInBest: {
+          label: '组合成绩最高人数排名'
+        },
+        rankInDisenroll: {
+          label: '补录人数排名'
+        },
+        subjects: {
+          label: '已选专业',
+          slot: 'subjects',
+          width: '150'
+        },
+        colleges: {
+          label: '院校',
+          slot: 'colleges',
+          width: '250'
+        },
+        report: {
+          label: '报告',
+          slot:'report'
+        },
+      }
+      const rows = this.tableInfo.rows.map(item => {
+        return {
+          groupName: item.groupName,
+          isRecommend: item.isRecommend,
+          rankInDisenroll: item.rankInDisenroll,
+          rankInBest: item.rankInBest,
+          bestInIndicator: item.bestInIndicator,
+          groupIndicator: item.groupIndicator,
+          scoreSumGroup: item.scoreSumGroup,
+          groupId: item.groupId,
+          subjects: item.subjects,
+          allowSelect: item.allowSelect,
+          colleges: item.colleges
+        }
+      })
+      return {
+        cols,
+        rows
+      }
+    }
+  },
+  methods: {
+    open(tableInfo,currentGeneration) {
+      this.current = currentGeneration
+      this.dialogVisible = true
+      this.tableInfo = tableInfo
+    },
+    handleClose() {
+
+    }
+  }
+}
+</script>
+<style scoped>
+</style>

+ 20 - 6
src/views/system/user/profile/components/report-table.vue

@@ -2,8 +2,12 @@
   <el-card>
     <template #header>
       <div class="fx-row fx-bet-cen">
-        选科报名表
-        <el-button>选科历史记录</el-button>
+        <span>选科报名表</span>
+        <div>
+          <el-button type="primary" @click="toAiAnalysis">AI分析</el-button>
+          <el-button>选科历史记录</el-button>
+        </div>
+
       </div>
     </template>
     <mx-table :propDefines="formatTable.cols" :rows="formatTable.rows">
@@ -33,8 +37,9 @@
         </el-row>
       </template>
     </mx-table>
-    <p>您的选科志愿: <span v-for="(item,index) in selectedList"
-    >{{ item.groupName }}{{ index + 1 < selectedList.length ? '、' : '' }}</span></p>
+    <p>您的选科志愿: <span v-for="(item,index) in selectedList">
+      {{ item.groupName }}{{ index + 1 < selectedList.length ? '、' : '' }}</span>
+    </p>
     <!-- 拖拽 -->
     <test-drage ref="drage" :sortList="selectedList"></test-drage>
     <el-button @click="commit" type="primary">提交</el-button>
@@ -50,9 +55,11 @@
       </span>
     </el-dialog>
     <choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
+    <Ai-dialog ref="aiDialog"></Ai-dialog>
   </el-card>
 </template>
 <script>
+import AiDialog from './ai-analysis-dialog'
 import MxSelectTranslate from '@/components/Cache/modules/mx-select-translate-mixin.js'
 import TestDrage from './test-drage'
 import VueEsign from '@/components/VueEsign/index'
@@ -62,7 +69,8 @@ export default {
   components: {
     TestDrage,
     VueEsign,
-    ChooseSubjectDialog
+    ChooseSubjectDialog,
+    AiDialog
   },
   mixins: [MxSelectTranslate],
   data() {
@@ -161,13 +169,19 @@ export default {
 
   },
   methods: {
+    toAiAnalysis() {
+      //
+      const currentGeneration = 1
+      // AI 分析 跳转
+      this.$refs.aiDialog.open(this.formatTable,currentGeneration)
+    },
     commit() {
       console.log(this.selectedList)
       const real = this.selectedList.filter(item => {
         return item.selected == true
       })
       if (real.length < this.preferenceCount) {
-        this.$message.warning(`要选择${this.preferenceCount}个志愿`)
+        this.$message.warning(`初录报名需要选择${this.preferenceCount}个志愿`)
         return
       }
       this.dialogVisible = true