瀏覽代碼

请假、考勤

reloaded 5 年之前
父節點
當前提交
f3786a080b
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 1 0
      parts/attendance.vue
  2. 4 5
      parts/leave.vue

+ 1 - 0
parts/attendance.vue

@@ -60,6 +60,7 @@ export default {
         }
       }
       this.$set(this, `tableData`, data);
+      this.$emit('initTotal', data.length);
     },
     // 取得日期间所有日期
     async getAllDays(begin_date, end_date) {

+ 4 - 5
parts/leave.vue

@@ -5,12 +5,12 @@
       <el-table-column prop="endtime" label="请假结束时间"> </el-table-column>
       <el-table-column prop="stuname" label="学生姓名"> </el-table-column>
       <el-table-column prop="reason" label="请假理由"> </el-table-column>
-      <el-table-column label="请假类型" align="center">
+      <el-table-column label="请假类型">
         <template slot-scope="scope">
-          <span>{{ scope.row.type === '0' ? '请假' : scope.row.status === '1' ? '退出' : '' }}</span>
+          <span>{{ scope.row.type === '0' ? '请假' : '退出' }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="状态" align="center">
+      <el-table-column label="状态">
         <template slot-scope="scope">
           <span>{{ scope.row.status === '0' ? '审核中' : scope.row.status === '1' ? '审核通过' : scope.row.status === '2' ? '审核拒绝' : '' }}</span>
         </template>
@@ -26,7 +26,6 @@ export default {
   name: 'leave',
   props: {
     classId: {},
-    total: {},
   },
   components: {},
   data: () => ({
@@ -40,8 +39,8 @@ export default {
       const leaveInfo = await this.query({ classid: this.classId });
       if (leaveInfo.errcode == 0) {
         this.$set(this, `tableData`, leaveInfo.data);
+        this.$emit('initTotal', leaveInfo.total);
       }
-      this.total = leaveInfo.length;
     },
   },
   watch: {