瀏覽代碼

prepare for major-detail

hare8999@163.com 2 年之前
父節點
當前提交
5407b20719

+ 3 - 3
src/views/elective/report/components/elective-test-reports.vue

@@ -5,7 +5,7 @@
     </index-card>
     <index-card title="选科测评专业" class="mt20">
       <test-result :all-test-results="testResults" :selected-majors="summary.selectedList" readonly></test-result>
-      <elective-major-match></elective-major-match>
+      <major-match-evaluation></major-match-evaluation>
     </index-card>
   </div>
 </template>
@@ -14,12 +14,12 @@
 import TestSummary from '@/views/elective/test/components/test-summary'
 import IndexCard from '@/views/index/components/index-card'
 import TestReport from '@/views/elective/test/components/test-report'
-import ElectiveMajorMatch from '@/views/elective/report/components/elective-major-match'
+import MajorMatchEvaluation from '@/views/elective/report/components/major-match-evaluation'
 
 export default {
   name: 'elective-test-reports',
   extends: TestSummary, // NOTE: 这里直接继承了TestSummary页面的关键能力
-  components: { ElectiveMajorMatch, TestReport, IndexCard }
+  components: { MajorMatchEvaluation, TestReport, IndexCard }
 }
 </script>
 

+ 1 - 1
src/views/elective/report/components/elective-major-match.vue → src/views/elective/report/components/major-match-evaluation.vue

@@ -6,7 +6,7 @@
 import GroupsMatchTable from '@/views/elective/select/components/groups-match-table'
 
 export default {
-  name: 'elective-major-match',
+  name: 'major-match-evaluation',
   components: { GroupsMatchTable },
   inject: ['getGeneration', 'getEvaluationMajors'],
   computed: {

+ 25 - 0
src/views/elective/report/components/major-match-optional.vue

@@ -0,0 +1,25 @@
+<template>
+  <groups-match-table :groups="groups" :majors="majors" hidden-rank></groups-match-table>
+</template>
+
+<script>
+import GroupsMatchTable from '@/views/elective/select/components/groups-match-table'
+
+export default {
+  name: 'major-match-optional',
+  components: { GroupsMatchTable },
+  inject: ['getGeneration', 'getOptionalMajors'],
+  computed: {
+    groups() {
+      return this.getGeneration()?.roundGroups || []
+    },
+    majors() {
+      return this.getOptionalMajors() || []
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 1
src/views/elective/report/index.vue

@@ -6,6 +6,8 @@
       <el-divider><h1>选科大数据分析</h1></el-divider>
       <group-subject-query></group-subject-query>
       <el-divider><h1>自选专业</h1></el-divider>
+      <major-match-optional></major-match-optional>
+      <el-divider><h1>专业介绍</h1></el-divider>
     </div>
   </div>
 </template>
@@ -15,11 +17,12 @@
 import ElectiveTestReports from '@/views/elective/report/components/elective-test-reports'
 import GroupSubjectQuery from '@/views/permission/components/group-subject-query'
 import RoundSelect from '@/views/system/user/profile/round-select'
+import MajorMatchOptional from '@/views/elective/report/components/major-match-optional'
 
 export default {
   name: 'report-index',
   extends: RoundSelect,
-  components: { RoundSelect, GroupSubjectQuery, ElectiveTestReports },
+  components: { MajorMatchOptional, RoundSelect, GroupSubjectQuery, ElectiveTestReports },
   data() {
     // TODO: 报告应该与学年和轮次相关,先暂时渲染出最近的轮次数据
     return {