Browse Source

补录选科报名AI分析

shilipojs 2 years ago
parent
commit
24b9c65ff4

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

@@ -6,7 +6,7 @@
     :close-on-click-modal ="false"
     width="80%"
   >
-    <p class="mb10"><el-button type="primary" @click="$refs.SingleSubjectReport.dialogVisible = true">整体报告</el-button></p>
+    <p class="mb10"><el-button type="primary" @click="toReport('all')">整体报告</el-button></p>
 
     <mx-table :propDefines="propDefines" :rows="formatRows">
       <template #underOver="{value}">
@@ -32,13 +32,13 @@
         </el-row>
       </template>
       <template #report="{row}">
-        <el-button @click="toReport(row)" >查看</el-button>
+        <el-button @click="toReport('single',row)" >查看</el-button>
       </template>
     </mx-table>
     <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
     </span>
-    <single-subject-report :prevPreferences="prevPreferences"  :reportInfo="formatRows" :currentGroup="currentReportName" ref="SingleSubjectReport"></single-subject-report>
+    <single-subject-report :prevPreferences="prevPreferences"  :reportInfo="formatRows"  ref="SingleSubjectReport"></single-subject-report>
   </el-dialog>
 </template>
 <script>
@@ -68,7 +68,8 @@ export default {
     resolveTablePrefix() {
       return {
         groupName: {
-          label: '选科组合'
+          label: '选科组合',
+          slot: 'group'
         },
         scoreSumGroup: {
           label: '组合成绩'
@@ -123,9 +124,8 @@ export default {
     }
   },
   methods: {
-    toReport(row) {
-      this.currentReportName = row.groupName
-      this.$refs.SingleSubjectReport.dialogVisible = true
+    toReport(type,row) {
+      this.$refs.SingleSubjectReport.init(type,row)
     },
     open(rows) {
       this.dialogVisible = true

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

@@ -10,7 +10,7 @@ export default {
         const disenrollAll = Math.abs(models.sum(m => Math.min(0, m.nextGroupIndicator || 0)))
         item.groupIndicator = currentGroup.nextGroupIndicator
         item.supplyBestIndicator = currentGroup.bestInIndicator || '/'
-        item.supplyRankInBest = currentGroup.allowSelect ? `${currentGroup.rankInBest}/${currentGroup.bestInIndicator}` : '/'
+        item.supplyRankInBest = (!currentGroup.approved && !currentGroup.forceAdjusted)? `${currentGroup.rankInBest}/${currentGroup.bestInIndicator}` : '/'
         item.supplyRankInDisenroll = currentGroup.rankInDisenroll ? `${currentGroup.rankInDisenroll}/${disenrollAll}` : '/'
       })
       return {

+ 65 - 48
src/views/system/user/profile/components/single-subject-report.vue

@@ -2,49 +2,61 @@
   <el-dialog
     append-to-body
     v-if="dialogVisible"
-    title="单科报告"
+    :title="aiType == 'all' ? '整体报告' : '单科报告'"
     :visible.sync="dialogVisible"
     width="70%"
   >
-    <div v-if="Object.keys(reportInfo).length > 0">
-      <p>点评:</p>
-      <div class="mt10 mb10">
-        <p>1,学校现在所开设的六种科目,
-          <span  class="f-red">
+    <div v-if="aiType == 'single' && !singleRow.allowSelect">
+      {{singleRow.groupName}}不可报名
+    </div>
+    <div v-else>
+      <div v-if="Object.keys(reportInfo).length > 0">
+        <p>点评:</p>
+        <div class="mt10 mb10">
+          <p>1,学校现在所开设的六种科目,
+            <span  class="f-red">
             {{tipsModel.admissionInfo}}
           </span>,
-          现有
-          <span class="f-primary">
+            现有
+            <span class="f-primary">
             {{ canSign.map(item => item.groupName).join(',') }}
           </span>您可以报名
-        </p>
-      </div>
-      <div class="mb10">
-        <p>2,专业符合情况:</p>
-        <div class="mb5" v-for="item in canSign">
-          <span class="f-primary mr5"> {{item.groupName}}:</span>
-          <div style="display: inline" v-if="item.colleges.length > 0">
-            <span class="mr5" v-for="college in item.colleges">{{`${college.major}(${college.college})`}},</span>
-             符合您的专业要求;
+          </p>
+        </div>
+        <div class="mb10">
+          <p>2,专业符合情况:</p>
+          <div class="mb5" v-for="item in canSign">
+            <div v-if="!singleRow || singleRow.groupId == item.groupId">
+              <span class="f-primary mr5"> {{item.groupName}}:</span>
+              <div style="display: inline" v-if="item.colleges.length > 0">
+                <span class="mr5" v-for="college in item.colleges">{{`${college.major}(${college.college})`}},</span>
+                符合您的专业要求;
+              </div>
+              <p style="display: inline" class="f-red" v-else>您的自选专业没有符合该组合的</p>
+            </div>
+
           </div>
-          <p style="display: inline" class="f-red" v-else>您的自选专业没有符合该组合的</p>
         </div>
-      </div>
-      <div class="mb10">
-        <p>3,三科成绩情况:</p>
-        <div v-for="(item,index) in canSign">
-          <span>{{item.groupName}} : </span>成绩{{item.scoreSumGroup}} <span class="f-primary" v-if="index == 0"> *成绩最优</span>
+        <div class="mb10">
+          <p>3,成绩情况:</p>
+          <div v-for="(item,index) in canSign">
+            <p v-if=" !singleRow || singleRow.groupId == item.groupId"><span>{{item.groupName}} : </span>成绩{{item.scoreSumGroup}} <span class="f-primary" v-if="index == 0"> *成绩最优</span>
+            </p>
+          </div>
         </div>
-      </div>
-      <div class="mb10">
-        <p class="mb10">4,三科录取分析:</p>
-        <div v-for="(item,index) in canSign" class="mb10">
-          <p>{{item.groupName}} : 成绩{{item.scoreSumGroup}}<span class="f-primary" v-if="index == 0"> (补录成绩最优组合)</span> </p>
-          <p>在补录学生{{tipsModel.countNumber}}人中该组合成绩最优学生有{{item.bestInIndicator}}人,该组合计划人数为{{item.groupIndicator}}
-            您在该<span v-if="index == 0">最优</span>组合中排名{{ item.rankInBest }},您可以被该组合录取。您的成绩符合该组合。<span v-if="item.colleges.length == 0">(自选专业不符合)</span>
-            <span v-if="index == 0">按照成绩优先原则,系统推荐您报该组合。</span>
-            <span v-else>您如果不填写系统推荐您的最优组合,您也可以报该组合。</span>
-          </p>
+        <div class="mb10">
+          <p class="mb10">4,录取分析:</p>
+          <div v-for="(item,index) in canSign" class="mb10">
+            <div v-if="!singleRow || singleRow.groupId == item.groupId">
+              <p>{{item.groupName}} : 成绩{{item.scoreSumGroup}}<span class="f-primary" v-if="index == 0"> (补录成绩最优组合)</span> </p>
+              <p>在补录学生{{tipsModel.countNumber}}人中该组合成绩最优学生有{{item.bestInIndicator}}人,该组合计划人数为{{item.groupIndicator}}
+                您在该<span v-if="index == 0">最优</span>组合中排名{{ item.rankInBest }},您可以被该组合录取。您的成绩符合该组合。<span v-if="item.colleges.length == 0">(自选专业不符合)</span>
+                <span v-if="index == 0">按照成绩优先原则,系统推荐您报该组合。</span>
+                <span v-else>您如果不填写系统推荐您的最优组合,您也可以报该组合。</span>
+              </p>
+            </div>
+
+          </div>
         </div>
       </div>
     </div>
@@ -57,6 +69,7 @@
 import MxSelectTranslateMixin from '@/components/Cache/modules/mx-select-translate-mixin.js'
 
 export default {
+  name: 'subject-report',
   mixins:[MxSelectTranslateMixin],
   props: {
     prevPreferences: {
@@ -66,10 +79,6 @@ export default {
     reportInfo: {
       type: Array,
       default: {}
-    },
-    currentGroup: {
-      type: String,
-      default: ''
     }
   },
   computed: {
@@ -87,15 +96,15 @@ export default {
         admissionInfo
       }
     },
-    isCanSignFlag() {
-      // 传入的组合是否能报名
-      if (!this.reportInfo.length) return {}
-      if (!this.currentGroup) return {}
-
-      return this.reportInfo.filter(item => {
-        return item.groupName == this.currentGroup
-      })[0]
-    },
+    // isCanSignFlag() {
+    //   // 传入的组合是否能报名
+    //   if (!this.reportInfo.length) return {}
+    //   if (!this.currentGroup) return {}
+    //
+    //   return this.reportInfo.filter(item => {
+    //     return item.groupName == this.currentGroup
+    //   })[0]
+    // },
     canSign() {
       if (!this.reportInfo.length) return []
       return this.reportInfo.filter(item => {
@@ -105,10 +114,18 @@ export default {
   },
   data() {
     return {
-      dialogVisible: false
+      dialogVisible: false,
+      singleRow: {}
     }
   },
-  methods: {}
+  methods: {
+    init(type,row) {
+      this.aiType = type
+      this.dialogVisible = true
+      this.singleRow  =row
+      console.log(row)
+    }
+  }
 }
 </script>
 <style scoped>