Selaa lähdekoodia

校长端分班

shilipojs 2 vuotta sitten
vanhempi
commit
d07a2bfe39

+ 7 - 2
src/views/elective/dispatch/master/index.vue

@@ -5,7 +5,7 @@
                     @invalid="handleInvalidQuery"></mx-condition>
     </el-card>
 
-    <el-card v-if="queryParams.roundId">
+    <el-card v-if="round.allowDispatch">
       <div>
         <div>
           <div  v-if="round.allowDispatch && !round.dispatchCompleted" class="fx-row jc-between mb10">
@@ -31,7 +31,8 @@
         </mx-table>
       </div>
     </el-card>
-    <evaluation-empty v-else-if="!queryParams.roundId" shadow title="当前学年没有班主任分班数据"></evaluation-empty>
+    <evaluation-empty v-else shadow :title="emptyTitle"></evaluation-empty>
+
     <choose-master-teacher ref="chooseMasterTeacher" :roundId="queryParams.roundId"
                            :headTeacherSettings="headteacherSettings" @completed="handleQuery"></choose-master-teacher>
     <choose-class :roundId="queryParams.roundId" ref="chooseClass" :year="queryParams.year"
@@ -75,6 +76,10 @@ export default {
     }
   },
   computed: {
+    emptyTitle() {
+      if(Object.keys(this.round).length == 0 && !this.round.allowDispatch) return '当前学年没有班主任分班数据'
+      return '当前选科分班未开启'
+    },
     propDefines() {
       if(!Object.keys(this.round).length) return {}
       return  {

+ 1 - 1
src/views/elective/dispatch/student/index.vue

@@ -10,7 +10,7 @@
       <p class="text-right mt5 mb5 f14 mr5" v-if="round.dispatchCompleted">学生分班完成,在 {{publishSettings.activeDate}} 生效</p>
     </div>
     <dispatch-table v-if="round.allowDispatch" :loading="loading" :round="round" :settings="settings"></dispatch-table>
-    <evaluation-empty v-else-if="!round.allowDispatch" shadow :title="emptyTitle"></evaluation-empty>
+    <evaluation-empty v-else shadow :title="emptyTitle"></evaluation-empty>
   </div>
 </template>
 <script>