Browse Source

请假、考勤

reloaded 5 years ago
parent
commit
1145a2904a
2 changed files with 13 additions and 6 deletions
  1. 9 5
      src/views/classes/attendance.vue
  2. 4 1
      src/views/classes/qingjia.vue

+ 9 - 5
src/views/classes/attendance.vue

@@ -1,21 +1,22 @@
 <template>
   <div id="attendance">
-    <detail-frame title="考勤安排" :returns="toreturn">
-      <attendanceInfo :classId="classId"></attendanceInfo>
-    </detail-frame>
+    <listFrame :title="pageTitle" @query="search" :total="total" :needFilter="false" :returns="toreturn" :needAdd="false">
+      <attendanceInfo :classId="classId" @initTotal="initTotal"></attendanceInfo>
+    </listFrame>
   </div>
 </template>
 
 <script>
 import attendanceInfo from '@frame/parts/attendance';
-import detailFrame from '@frame/layout/admin/detail-frame';
+import listFrame from '@frame/layout/admin/list-frame';
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'attendance',
   props: {},
-  components: { attendanceInfo, detailFrame },
+  components: { attendanceInfo, listFrame },
   data: () => ({
     classId: {},
+    total: 0,
   }),
   created() {
     this.initId();
@@ -32,6 +33,9 @@ export default {
     toreturn() {
       window.history.go(-1);
     },
+    initTotal(total) {
+      this.$set(this, `total`, total);
+    },
   },
 };
 </script>

+ 4 - 1
src/views/classes/qingjia.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="qingjia">
     <listFrame :title="pageTitle" @query="search" :total="total" :needFilter="false" :returns="toreturn" :needAdd="false">
-      <leaveInfo :classId="classId"></leaveInfo>
+      <leaveInfo :classId="classId" @initTotal="initTotal"></leaveInfo>
     </listFrame>
   </div>
 </template>
@@ -33,6 +33,9 @@ export default {
     toreturn() {
       window.history.go(-1);
     },
+    initTotal(total) {
+      this.$set(this, `total`, total);
+    },
   },
   computed: {
     ...mapState(['user']),