Ver código fonte

学生报名---ai分析--单科报告

shilipojs 3 anos atrás
pai
commit
0770487df9

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

@@ -5,7 +5,8 @@
     :visible.sync="dialogVisible"
     width="80%"
   >
-    当前Generation   {{current}}
+    <p class="mb10 fx-row jc-between">当前Generation   {{current}} <el-button type="primary">整体报告</el-button></p>
+
     <mx-table :propDefines="formatTable.cols" :rows="formatTable.rows">
       <template #subjects="{row}">
         <el-row>
@@ -27,21 +28,28 @@
         </el-row>
       </template>
       <template #report="{row}">
-        <el-button >查看</el-button>
+        <el-button @click="toReport(row)" >查看</el-button>
       </template>
     </mx-table>
     <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
-      </span>
+    </span>
+    <single-subject-report :reportInfo="tableInfo.rows" :currentGroup="currentReportName" ref="SingleSubjectReport"></single-subject-report>
   </el-dialog>
 </template>
 <script>
 import config from '@/common/mx-config'
+import SingleSubjectReport from './single-subject-report'
 export default {
+  components:{
+    SingleSubjectReport
+  },
   data() {
     return{
       dialogVisible:false,
       tableInfo: {},
+      currentReportName: '',
+      reportInfo: {},
       current: ''
     }
   },
@@ -116,9 +124,14 @@ export default {
     }
   },
   methods: {
+    toReport(row) {
+      this.currentReportName = row.groupName
+      this.$refs.SingleSubjectReport.dialogVisible = true
+    },
     open(tableInfo,currentGeneration) {
       this.current = currentGeneration
       this.dialogVisible = true
+      console.log(this.$store.getters.currentUser)
       this.tableInfo = tableInfo
     },
     handleClose() {

+ 16 - 9
src/views/system/user/profile/components/report-table.vue

@@ -60,9 +60,13 @@
       <el-button @click="commit" type="primary">提交</el-button>
     </div>
     <!--  补录报名和二次补录报名 -->
-    <div v-else>
-      单志愿报名
-      <span v-for="item in singleList">{{item.groupName}}</span>
+    <div v-else >
+      <div v-for="item in singleList" class="mb5 mt5">
+        <el-button   @click="commit" type="primary">{{`${item.groupName} : 报名`}}</el-button>
+      </div>
+      <div  class="mb5 mt5">
+        <el-button  type="danger">不同意</el-button>
+      </div>
     </div>
     <esign-dialog ref="esignDialog"></esign-dialog>
     <choose-subject-dialog ref="chooseDialog"></choose-subject-dialog>
@@ -207,13 +211,16 @@ export default {
     },
     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}个志愿`)
-        return
+      if (this.generation == 0) {
+        const real = this.selectedList.filter(item => {
+          return item.selected == true
+        })
+        if (real.length < this.preferenceCount) {
+          this.$message.warning(`初录报名需要选择${this.preferenceCount}个志愿`)
+          return
+        }
       }
+
       this.$refs.esignDialog.open()
     },
     toSelect(row) {

+ 77 - 0
src/views/system/user/profile/components/single-subject-report.vue

@@ -0,0 +1,77 @@
+<template>
+  <el-dialog
+    append-to-body
+    v-if="dialogVisible"
+    title="单科报告"
+    :visible.sync="dialogVisible"
+    width="70%"
+  >
+    <div v-if="Object.keys(reportInfo).length > 0">
+      <p>点评:</p>
+      <div class="mt10 mb10">
+        <p>1,学校现在所开设的六种科目,<span :class="isCanSignFlag.allowSelect ? 'f-primary': 'f-red'">{{
+            isCanSignFlag.groupName
+          }}</span>
+          您
+          <span :class="isCanSignFlag.allowSelect ? 'f-primary': 'f-red'">
+          {{ isCanSignFlag.allowSelect ? '符合' : '不符合' }}
+          </span>条件,现有
+          <span class="f-primary">
+            {{ canSign.map(item => item.groupName).join(',') }}
+          </span>您可以报名
+        </p>
+      </div>
+      <div class="mb10">
+        <p>2,专业符合情况:</p>
+      </div>
+      <div class="mb10">
+        <p>3,三科成绩情况:</p>
+      </div>
+      <div class="mb10">
+        <p>4,三科录取分析:</p>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="dialogVisible =false">确 定</el-button>
+      </span>
+  </el-dialog>
+</template>
+<script>
+export default {
+  props: {
+    reportInfo: {
+      type: Array,
+      default: {}
+    },
+    currentGroup: {
+      type: String,
+      default: ''
+    }
+  },
+  computed: {
+    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 => {
+        return item.allowSelect
+      })
+    }
+  },
+  data() {
+    return {
+      dialogVisible: false
+    }
+  },
+  methods: {}
+}
+</script>
+<style scoped>
+</style>

+ 0 - 2
src/views/system/user/profile/round-select.vue

@@ -95,7 +95,6 @@
 </template>
 
 <script>
-
 import { getStudentSelected, saveStudentSelected } from '@/api/webApi/selection'
 import transferMixin from '@/components/mx-transfer-mixin'
 import consts from '@/common/mx-const'
@@ -116,7 +115,6 @@ export default {
     }
   },
   components: { SelectSubject, TestResult, TestEntry,ReportTable },
-  mixins: [transferMixin],
   name: 'round-select',
   data() {
     return {