|  | @@ -0,0 +1,132 @@
 | 
	
		
			
				|  |  | +<!--  -->
 | 
	
		
			
				|  |  | +<template>
 | 
	
		
			
				|  |  | +  <div class="m-container">
 | 
	
		
			
				|  |  | +    <h2>
 | 
	
		
			
				|  |  | +      <div class="squrt"></div>考勤列表
 | 
	
		
			
				|  |  | +    </h2>
 | 
	
		
			
				|  |  | +    <div class="m-core">
 | 
	
		
			
				|  |  | +      <el-form :inline="true"
 | 
	
		
			
				|  |  | +               :model="searchForm">
 | 
	
		
			
				|  |  | +        <el-form-item>
 | 
	
		
			
				|  |  | +          <el-input v-model.trim="searchForm.search"
 | 
	
		
			
				|  |  | +                    @keyup.enter.native="search"
 | 
	
		
			
				|  |  | +                    placeholder='老师编号或老师学生'></el-input>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item prop="organId">
 | 
	
		
			
				|  |  | +          <el-select class="multiple"
 | 
	
		
			
				|  |  | +                     v-model.trim="searchForm.organIdList"
 | 
	
		
			
				|  |  | +                     filterable
 | 
	
		
			
				|  |  | +                     clearable
 | 
	
		
			
				|  |  | +                     placeholder="请选择分部">
 | 
	
		
			
				|  |  | +            <el-option v-for="(item,index) in organList"
 | 
	
		
			
				|  |  | +                       :key="index"
 | 
	
		
			
				|  |  | +                       :label="item.name"
 | 
	
		
			
				|  |  | +                       :value="item.id"></el-option>
 | 
	
		
			
				|  |  | +          </el-select>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="课程类型">
 | 
	
		
			
				|  |  | +          <el-select v-model.trim="searchForm.courseScheduleType"
 | 
	
		
			
				|  |  | +                     @change="chioseList">
 | 
	
		
			
				|  |  | +            <el-option v-for='(item,index) in courseType'
 | 
	
		
			
				|  |  | +                       :key="index"
 | 
	
		
			
				|  |  | +                       :value="item.value"
 | 
	
		
			
				|  |  | +                       :label="item.label"></el-option>
 | 
	
		
			
				|  |  | +          </el-select>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item>
 | 
	
		
			
				|  |  | +          <el-date-picker v-model.trim="courseTime"
 | 
	
		
			
				|  |  | +                          style="width:410px;"
 | 
	
		
			
				|  |  | +                          type="daterange"
 | 
	
		
			
				|  |  | +                          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                          range-separator="至"
 | 
	
		
			
				|  |  | +                          start-placeholder="开始日期"
 | 
	
		
			
				|  |  | +                          end-placeholder="结束日期">
 | 
	
		
			
				|  |  | +          </el-date-picker>
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +      </el-form>
 | 
	
		
			
				|  |  | +      <div class="tableWrap">
 | 
	
		
			
				|  |  | +        <el-table style="width: 100%"
 | 
	
		
			
				|  |  | +                  :header-cell-style="{background:'#EDEEF0',color:'#444'}"
 | 
	
		
			
				|  |  | +                  :data="tableList">
 | 
	
		
			
				|  |  | +          <el-table-column align="center"
 | 
	
		
			
				|  |  | +                           prop="studentId"
 | 
	
		
			
				|  |  | +                           label="分部"></el-table-column>
 | 
	
		
			
				|  |  | +        </el-table>
 | 
	
		
			
				|  |  | +        <pagination :total="rules.total"
 | 
	
		
			
				|  |  | +                    :page.sync="rules.page"
 | 
	
		
			
				|  |  | +                    :limit.sync="rules.limit"
 | 
	
		
			
				|  |  | +                    :page-sizes="rules.page_size"
 | 
	
		
			
				|  |  | +                    @pagination="getList" />
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    </div>
 | 
	
		
			
				|  |  | +  </div>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +import axios from "axios";
 | 
	
		
			
				|  |  | +import { getToken } from "@/utils/auth";
 | 
	
		
			
				|  |  | +import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | +import load from "@/utils/loading";
 | 
	
		
			
				|  |  | +import { getTeacher, getEmployeeOrgan } from "@/api/buildTeam";
 | 
	
		
			
				|  |  | +import { getTeacherPersonalAttendances } from "@/api/teacherManager";
 | 
	
		
			
				|  |  | +import { coursesType } from '@/utils/searchArray'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +export default {
 | 
	
		
			
				|  |  | +  components: { pagination },
 | 
	
		
			
				|  |  | +  data () {
 | 
	
		
			
				|  |  | +    return {
 | 
	
		
			
				|  |  | +      searchForm: {
 | 
	
		
			
				|  |  | +        search: null,
 | 
	
		
			
				|  |  | +        organIdList: null,
 | 
	
		
			
				|  |  | +        courseTime: [],
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      coursesType,
 | 
	
		
			
				|  |  | +      // teacherList: [],
 | 
	
		
			
				|  |  | +      tableList: [],
 | 
	
		
			
				|  |  | +      organList: [],
 | 
	
		
			
				|  |  | +      rules: {
 | 
	
		
			
				|  |  | +        // 分页规则
 | 
	
		
			
				|  |  | +        limit: 10, // 限制显示条数
 | 
	
		
			
				|  |  | +        page: 1, // 当前页
 | 
	
		
			
				|  |  | +        total: 0, // 总条数
 | 
	
		
			
				|  |  | +        page_size: [10, 20, 40, 50] // 选择限制显示条数
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  //生命周期 - 创建完成(可以访问当前this实例)
 | 
	
		
			
				|  |  | +  created () { },
 | 
	
		
			
				|  |  | +  //生命周期 - 挂载完成(可以访问DOM元素)
 | 
	
		
			
				|  |  | +  mounted () {
 | 
	
		
			
				|  |  | +    // getTeacher().then(res => {
 | 
	
		
			
				|  |  | +    //   if (res.code == 200) {
 | 
	
		
			
				|  |  | +    //     this.teacherList = res.data;
 | 
	
		
			
				|  |  | +    //   }
 | 
	
		
			
				|  |  | +    // });
 | 
	
		
			
				|  |  | +    // 获取分部
 | 
	
		
			
				|  |  | +    getEmployeeOrgan().then(res => {
 | 
	
		
			
				|  |  | +      if (res.code == 200) {
 | 
	
		
			
				|  |  | +        this.organList = res.data;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    this.init();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  activated () {
 | 
	
		
			
				|  |  | +    this.init();
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    init () {
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getList () {
 | 
	
		
			
				|  |  | +      getTeacherPersonalAttendances().then(res => {
 | 
	
		
			
				|  |  | +        if (res.code == 200) {
 | 
	
		
			
				|  |  | +          this.tableList = res.data.rows;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +<style lang='scss' scoped>
 | 
	
		
			
				|  |  | +</style>
 |