Browse Source

optional major hidden when no-data

hare8999@163.com 2 years ago
parent
commit
b6b993660c

+ 6 - 2
src/views/elective/report/components/major-match-optional.vue

@@ -1,13 +1,17 @@
 <template>
-  <groups-match-table :groups="groups" :majors="majors" hidden-rank></groups-match-table>
+  <div v-if="majors.length&&groups.length">
+    <report-section-title class="new-page">自选专业</report-section-title>
+    <groups-match-table :groups="groups" :majors="majors" hidden-rank></groups-match-table>
+  </div>
 </template>
 
 <script>
 import GroupsMatchTable from '@/views/elective/select/components/groups-match-table'
+import ReportSectionTitle from '@/views/elective/report/components/report-section-title'
 
 export default {
   name: 'major-match-optional',
-  components: { GroupsMatchTable },
+  components: { ReportSectionTitle, GroupsMatchTable },
   inject: ['getGeneration', 'getOptionalMajors'],
   computed: {
     groups() {

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

@@ -11,7 +11,6 @@
       <elective-test-reports></elective-test-reports>
       <report-section-title class="new-page">选科大数据分析</report-section-title>
       <group-subject-query class="print-page"></group-subject-query>
-      <report-section-title class="new-page">自选专业</report-section-title>
       <major-match-optional class="print-page"></major-match-optional>
       <major-introduce-batch></major-introduce-batch>
       <template v-if="showScore">