|  | @@ -1,112 +1,101 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | -  <div class='tr-cotainer'>
 | 
	
		
			
				|  |  | +  <div class="tr-cotainer">
 | 
	
		
			
				|  |  |      <!-- 搜索标题 -->
 | 
	
		
			
				|  |  | -    <el-form :inline="true"
 | 
	
		
			
				|  |  | -             class="searchForm"
 | 
	
		
			
				|  |  | -             v-model.trim="searchForm">
 | 
	
		
			
				|  |  | +    <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-date-picker style="width: 400px;"
 | 
	
		
			
				|  |  | -                        v-model.trim="courseDate"
 | 
	
		
			
				|  |  | -                        type="daterange"
 | 
	
		
			
				|  |  | -                        value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | -                        @change="searchCourseDate"
 | 
	
		
			
				|  |  | -                        range-separator="至"
 | 
	
		
			
				|  |  | -                        start-placeholder="开始日期"
 | 
	
		
			
				|  |  | -                        end-placeholder="结束日期">
 | 
	
		
			
				|  |  | -        </el-date-picker>
 | 
	
		
			
				|  |  | +        <el-date-picker
 | 
	
		
			
				|  |  | +          style="width: 400px;"
 | 
	
		
			
				|  |  | +          v-model.trim="courseDate"
 | 
	
		
			
				|  |  | +          type="daterange"
 | 
	
		
			
				|  |  | +          value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +          @change="searchCourseDate"
 | 
	
		
			
				|  |  | +          range-separator="至"
 | 
	
		
			
				|  |  | +          start-placeholder="开始日期"
 | 
	
		
			
				|  |  | +          end-placeholder="结束日期"
 | 
	
		
			
				|  |  | +        ></el-date-picker>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-select v-model.trim="searchForm.courseScheduleType"
 | 
	
		
			
				|  |  | -                   clearable
 | 
	
		
			
				|  |  | -                   filterable
 | 
	
		
			
				|  |  | -                   placeholder="课程类型">
 | 
	
		
			
				|  |  | -          <el-option v-for="(item, index) in courseType"
 | 
	
		
			
				|  |  | -                     :key="index"
 | 
	
		
			
				|  |  | -                     :label="item.label"
 | 
	
		
			
				|  |  | -                     :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.courseScheduleType"
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          filterable
 | 
	
		
			
				|  |  | +          placeholder="课程类型"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="(item, index) in courseType"
 | 
	
		
			
				|  |  | +            :key="index"
 | 
	
		
			
				|  |  | +            :label="item.label"
 | 
	
		
			
				|  |  | +            :value="item.value"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |          </el-select>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-input placeholder="课程名称"
 | 
	
		
			
				|  |  | -                  @keyup.enter.native='search'
 | 
	
		
			
				|  |  | -                  v-model.trim="searchForm.classGroupName"></el-input>
 | 
	
		
			
				|  |  | +        <el-input
 | 
	
		
			
				|  |  | +          placeholder="课程名称"
 | 
	
		
			
				|  |  | +          @keyup.enter.native="search"
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.classGroupName"
 | 
	
		
			
				|  |  | +        ></el-input>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-select v-model.trim="searchForm.signInStatus"
 | 
	
		
			
				|  |  | -                   filterable
 | 
	
		
			
				|  |  | -                   clearable
 | 
	
		
			
				|  |  | -                   placeholder="考勤状态">
 | 
	
		
			
				|  |  | -          <el-option v-for="(item, index) in attendance"
 | 
	
		
			
				|  |  | -                     :key="index"
 | 
	
		
			
				|  |  | -                     :label="item.label"
 | 
	
		
			
				|  |  | -                     :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +        <el-select v-model.trim="searchForm.signInStatus" filterable clearable placeholder="考勤状态">
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="(item, index) in attendance"
 | 
	
		
			
				|  |  | +            :key="index"
 | 
	
		
			
				|  |  | +            :label="item.label"
 | 
	
		
			
				|  |  | +            :value="item.value"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |          </el-select>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-button @click="search"
 | 
	
		
			
				|  |  | -                   type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | -        <el-button @click="onReSet"
 | 
	
		
			
				|  |  | -                   type="primary">重置</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="search" type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="onReSet" type="primary">重置</el-button>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |      </el-form>
 | 
	
		
			
				|  |  |      <!-- 列表 -->
 | 
	
		
			
				|  |  |      <div class="tableWrap">
 | 
	
		
			
				|  |  |        <div class="tableWrap">
 | 
	
		
			
				|  |  | -        <el-table :data='tableList'
 | 
	
		
			
				|  |  | -                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="上课时间">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.classDate }} {{ scope.row.startClassTime }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +        <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="courseScheduleId" label="课程编号"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="上课时间" width="150">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.classDate }} {{ scope.row.startClassTime }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="课程类型">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.type | coursesType }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="下课时间"  width="150">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.classDate }} {{ scope.row.endClassTime }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           prop="name"
 | 
	
		
			
				|  |  | -                           label="课程名称">
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="课程类型">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.type | coursesType }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="签到">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.signInStatus | attendanceType }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="name" label="课程名称"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="签到">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.signInStatus | attendanceType }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           label="签退">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -              {{ scope.row.signOutStatus | attendanceOutType }}
 | 
	
		
			
				|  |  | -            </template>
 | 
	
		
			
				|  |  | -          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                           prop="remark"
 | 
	
		
			
				|  |  | -                           label="备注">
 | 
	
		
			
				|  |  | +          <el-table-column align="center" label="签退">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">{{ scope.row.signOutStatus | attendanceOutType }}</template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="remark" label="备注"></el-table-column>
 | 
	
		
			
				|  |  |          </el-table>
 | 
	
		
			
				|  |  | -        <pagination :total="pageInfo.total"
 | 
	
		
			
				|  |  | -                    :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | -                    :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | -                    :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | -                    @pagination="getList" />
 | 
	
		
			
				|  |  | +        <pagination
 | 
	
		
			
				|  |  | +          :total="pageInfo.total"
 | 
	
		
			
				|  |  | +          :page.sync="pageInfo.page"
 | 
	
		
			
				|  |  | +          :limit.sync="pageInfo.limit"
 | 
	
		
			
				|  |  | +          :page-sizes="pageInfo.page_size"
 | 
	
		
			
				|  |  | +          @pagination="getList"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import { getTeacherPersonalAttendances } from '@/api/teacherManager'
 | 
	
		
			
				|  |  | -import pagination from '@/components/Pagination/index'
 | 
	
		
			
				|  |  | -import store from '@/store'
 | 
	
		
			
				|  |  | -import { courseType, attendance } from '@/utils/searchArray'
 | 
	
		
			
				|  |  | +import { getTeacherPersonalAttendances } from "@/api/teacherManager";
 | 
	
		
			
				|  |  | +import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | +import store from "@/store";
 | 
	
		
			
				|  |  | +import { courseType, attendance } from "@/utils/searchArray";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  name: 'teacherRecord',
 | 
	
		
			
				|  |  | +  name: "teacherRecord",
 | 
	
		
			
				|  |  |    components: {
 | 
	
		
			
				|  |  |      pagination
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  data () {
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        courseType: courseType, // 课程类型
 | 
	
		
			
				|  |  |        attendance: attendance, // 考勤状态
 | 
	
	
		
			
				|  | @@ -128,52 +117,51 @@ export default {
 | 
	
		
			
				|  |  |          total: 1, // 总条数
 | 
	
		
			
				|  |  |          page_size: [10, 20, 40, 50] // 选择限制显示条数
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  mounted () {
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | +  mounted() {
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  activated () {
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | +  activated() {
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    search () {
 | 
	
		
			
				|  |  | +    search() {
 | 
	
		
			
				|  |  |        this.pageInfo.page = 1;
 | 
	
		
			
				|  |  |        this.getList();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    getList () {
 | 
	
		
			
				|  |  | -      let params = this.searchForm
 | 
	
		
			
				|  |  | -      params.rows = this.pageInfo.limit
 | 
	
		
			
				|  |  | -      params.page = this.pageInfo.page,
 | 
	
		
			
				|  |  | -        params.teacherId = this.teacherId
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  | +      let params = this.searchForm;
 | 
	
		
			
				|  |  | +      params.rows = this.pageInfo.limit;
 | 
	
		
			
				|  |  | +      (params.page = this.pageInfo.page), (params.teacherId = this.teacherId);
 | 
	
		
			
				|  |  |        getTeacherPersonalAttendances(params).then(res => {
 | 
	
		
			
				|  |  |          if (res.code == 200) {
 | 
	
		
			
				|  |  | -          this.tableList = res.data.rows
 | 
	
		
			
				|  |  | -          this.pageInfo.total = res.data.total
 | 
	
		
			
				|  |  | +          this.tableList = res.data.rows;
 | 
	
		
			
				|  |  | +          this.pageInfo.total = res.data.total;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    searchCourseDate (value) {
 | 
	
		
			
				|  |  | +    searchCourseDate(value) {
 | 
	
		
			
				|  |  |        if (value) {
 | 
	
		
			
				|  |  | -        this.searchForm.courseStartDate = value[0]
 | 
	
		
			
				|  |  | -        this.searchForm.courseEndDate = value[1]
 | 
	
		
			
				|  |  | +        this.searchForm.courseStartDate = value[0];
 | 
	
		
			
				|  |  | +        this.searchForm.courseEndDate = value[1];
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  | -        this.searchForm.courseStartDate = null
 | 
	
		
			
				|  |  | -        this.searchForm.courseEndDate = null
 | 
	
		
			
				|  |  | +        this.searchForm.courseStartDate = null;
 | 
	
		
			
				|  |  | +        this.searchForm.courseEndDate = null;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onReSet () {
 | 
	
		
			
				|  |  | -      this.courseDate = null
 | 
	
		
			
				|  |  | +    onReSet() {
 | 
	
		
			
				|  |  | +      this.courseDate = null;
 | 
	
		
			
				|  |  |        this.searchForm = {
 | 
	
		
			
				|  |  |          courseStartDate: null,
 | 
	
		
			
				|  |  |          courseEndDate: null,
 | 
	
		
			
				|  |  |          classGroupName: null,
 | 
	
		
			
				|  |  |          courseScheduleType: null,
 | 
	
		
			
				|  |  |          signInStatus: null
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang="scss" scope>
 | 
	
		
			
				|  |  |  .tr-cotainer {
 |