|  | @@ -1,57 +1,58 @@
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  |    <div>
 | 
	
		
			
				|  |  |      <!-- 搜索类型 -->
 | 
	
		
			
				|  |  | -    <el-form :inline="true"
 | 
	
		
			
				|  |  | -             class="searchForm"
 | 
	
		
			
				|  |  | -             v-model.trim="searchForm">
 | 
	
		
			
				|  |  | +    <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-select v-model.trim="searchForm.courseScheduleType"
 | 
	
		
			
				|  |  | -                   filterable
 | 
	
		
			
				|  |  | -                   clearable
 | 
	
		
			
				|  |  | -                   placeholder="课程类型">
 | 
	
		
			
				|  |  | -          <el-option v-for="(item, index) in courseArray"
 | 
	
		
			
				|  |  | -                     :key="index"
 | 
	
		
			
				|  |  | -                     :label="item.label"
 | 
	
		
			
				|  |  | -                     :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.courseScheduleType"
 | 
	
		
			
				|  |  | +          filterable
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          placeholder="课程类型"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="(item, index) in courseArray"
 | 
	
		
			
				|  |  | +            :key="index"
 | 
	
		
			
				|  |  | +            :label="item.label"
 | 
	
		
			
				|  |  | +            :value="item.value"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |          </el-select>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-select v-model.trim="searchForm.attendanceStatus"
 | 
	
		
			
				|  |  | -                   filterable
 | 
	
		
			
				|  |  | -                   clearable
 | 
	
		
			
				|  |  | -                   placeholder="考勤状态">
 | 
	
		
			
				|  |  | -          <el-option v-for="(item, index) in att"
 | 
	
		
			
				|  |  | -                     :key="index"
 | 
	
		
			
				|  |  | -                     :label="item.label"
 | 
	
		
			
				|  |  | -                     :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +        <el-select
 | 
	
		
			
				|  |  | +          v-model.trim="searchForm.attendanceStatus"
 | 
	
		
			
				|  |  | +          filterable
 | 
	
		
			
				|  |  | +          clearable
 | 
	
		
			
				|  |  | +          placeholder="考勤状态"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="(item, index) in att"
 | 
	
		
			
				|  |  | +            :key="index"
 | 
	
		
			
				|  |  | +            :label="item.label"
 | 
	
		
			
				|  |  | +            :value="item.value"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |          </el-select>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  | -            <el-form-item>
 | 
	
		
			
				|  |  | -        <el-select v-model.trim="searchForm.courseStatus"
 | 
	
		
			
				|  |  | -                   filterable
 | 
	
		
			
				|  |  | -                   clearable
 | 
	
		
			
				|  |  | -                   placeholder="课程状态">
 | 
	
		
			
				|  |  | -          <el-option v-for="(item, index) in courseStatus"
 | 
	
		
			
				|  |  | -                     :key="index"
 | 
	
		
			
				|  |  | -                     :label="item.label"
 | 
	
		
			
				|  |  | -                     :value="item.value"></el-option>
 | 
	
		
			
				|  |  | +      <el-form-item>
 | 
	
		
			
				|  |  | +        <el-select v-model.trim="searchForm.courseStatus" filterable clearable placeholder="课程状态">
 | 
	
		
			
				|  |  | +          <el-option
 | 
	
		
			
				|  |  | +            v-for="(item, index) in courseStatus"
 | 
	
		
			
				|  |  | +            :key="index"
 | 
	
		
			
				|  |  | +            :label="item.label"
 | 
	
		
			
				|  |  | +            :value="item.value"
 | 
	
		
			
				|  |  | +          ></el-option>
 | 
	
		
			
				|  |  |          </el-select>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-input placeholder="班级名称"
 | 
	
		
			
				|  |  | -                  v-model.trim="searchForm.classGroupName"></el-input>
 | 
	
		
			
				|  |  | +        <el-input placeholder="班级名称" v-model.trim="searchForm.classGroupName"></el-input>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-input placeholder="老师姓名"
 | 
	
		
			
				|  |  | -                  v-model.trim="searchForm.teacherName"></el-input>
 | 
	
		
			
				|  |  | +        <el-input placeholder="老师姓名" v-model.trim="searchForm.teacherName"></el-input>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-button @click="search"
 | 
	
		
			
				|  |  | -                   type="danger">搜索</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="search" type="danger">搜索</el-button>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |        <el-form-item>
 | 
	
		
			
				|  |  | -        <el-button @click="onReSet"
 | 
	
		
			
				|  |  | -                   type="primary">重置</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="onReSet" type="primary">重置</el-button>
 | 
	
		
			
				|  |  |        </el-form-item>
 | 
	
		
			
				|  |  |      </el-form>
 | 
	
		
			
				|  |  |      <!-- 查询列表 -->
 | 
	
	
		
			
				|  | @@ -63,79 +64,57 @@
 | 
	
		
			
				|  |  |          {{ item.key }}
 | 
	
		
			
				|  |  |          <i class="el-icon-close"></i>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  | -    </div> -->
 | 
	
		
			
				|  |  | +    </div>-->
 | 
	
		
			
				|  |  |      <!-- 列表 -->
 | 
	
		
			
				|  |  |      <div class="tableWrap">
 | 
	
		
			
				|  |  | -      <el-table :data='tableList'
 | 
	
		
			
				|  |  | -                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="courseDate"
 | 
	
		
			
				|  |  | -                         label="上课时间">
 | 
	
		
			
				|  |  | +      <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="courseDate" label="上课时间"></el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column align="center" label="星期几">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">{{ scope.row.courseDate | formatWeek }}</template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         label="星期几">
 | 
	
		
			
				|  |  | -          <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.courseDate | formatWeek }}
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | +        <el-table-column align="center" label="课程状态">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">{{ scope.row.courseStatus | coursesStatus }}</template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         label="课程状态">
 | 
	
		
			
				|  |  | -          <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.courseStatus | coursesStatus }}
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | +        <el-table-column align="center" label="课程类型">
 | 
	
		
			
				|  |  | +          <template slot-scope="scope">{{ scope.row.courseScheduleType | coursesType }}</template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         label="课程类型">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="classGroupName" label="班级名称"></el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="currentCLassTimes" label="当前课次">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            {{ scope.row.courseScheduleType | coursesType }}
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="classGroupName"
 | 
	
		
			
				|  |  | -                         label="班级名称">
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="currentCLassTimes"
 | 
	
		
			
				|  |  | -                         label="当前课次">
 | 
	
		
			
				|  |  | -          <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            <div>
 | 
	
		
			
				|  |  | -              {{ scope.row.currentCLassTimes + '/'+scope.row.totalClassTimes }}
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | +            <div>{{ scope.row.currentCLassTimes + '/'+scope.row.totalClassTimes }}</div>
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="teacherName"
 | 
	
		
			
				|  |  | -                         label="课程老师">
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | -        <el-table-column align='center'
 | 
	
		
			
				|  |  | -                         prop="attendanceStatus"
 | 
	
		
			
				|  |  | -                         label="考勤状态">
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="teacherName" label="课程老师"></el-table-column>
 | 
	
		
			
				|  |  | +        <el-table-column align="center" prop="attendanceStatus" label="考勤状态">
 | 
	
		
			
				|  |  |            <template slot-scope="scope">
 | 
	
		
			
				|  |  |              <!-- 因为未开始的课返回为旷课 产品要求写为未签到 -->
 | 
	
		
			
				|  |  |              <div>
 | 
	
		
			
				|  |  | -              <p v-if="scope.row.courseStatus != 'NOT_START'">{{ scope.row.attendanceStatus | clockingIn }}</p> 
 | 
	
		
			
				|  |  | -              <p v-if="scope.row.courseStatus == 'NOT_START'">未签到 </p>
 | 
	
		
			
				|  |  | +              <p
 | 
	
		
			
				|  |  | +                v-if="scope.row.courseStatus != 'NOT_START'"
 | 
	
		
			
				|  |  | +              >{{ scope.row.attendanceStatus | clockingIn }}</p>
 | 
	
		
			
				|  |  | +              <p v-if="scope.row.courseStatus == 'NOT_START'">未签到</p>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  |            </template>
 | 
	
		
			
				|  |  |          </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>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import pagination from '@/components/Pagination/index'
 | 
	
		
			
				|  |  | -import { findStudentAttendances } from '@/api/studentManager'
 | 
	
		
			
				|  |  | -import { courseStatus,courseType } from '@/utils/searchArray'
 | 
	
		
			
				|  |  | +import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  | +import { findStudentAttendances } from "@/api/studentManager";
 | 
	
		
			
				|  |  | +import { courseStatus, courseType } from "@/utils/searchArray";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | -  name: 'studentRecord',
 | 
	
		
			
				|  |  | +  name: "studentRecord",
 | 
	
		
			
				|  |  |    components: { pagination },
 | 
	
		
			
				|  |  | -  data () {
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        searchForm: {
 | 
	
		
			
				|  |  |          studentId: null,
 | 
	
	
		
			
				|  | @@ -143,64 +122,77 @@ export default {
 | 
	
		
			
				|  |  |          attendanceStatus: null,
 | 
	
		
			
				|  |  |          classGroupName: null,
 | 
	
		
			
				|  |  |          teacherName: null,
 | 
	
		
			
				|  |  | -        courseStatus:null
 | 
	
		
			
				|  |  | +        courseStatus: null
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        searchLsit: [],
 | 
	
		
			
				|  |  |        tableList: [],
 | 
	
		
			
				|  |  | -      courseArray: courseType,
 | 
	
		
			
				|  |  | -        
 | 
	
		
			
				|  |  | +      courseArray: [
 | 
	
		
			
				|  |  | +        { label: "单技课", value: "SINGLE" },
 | 
	
		
			
				|  |  | +        { label: "合奏课", value: "MIX" },
 | 
	
		
			
				|  |  | +        { label: "基础技能课", value: "HIGH" },
 | 
	
		
			
				|  |  | +        { label: "vip课", value: "VIP" },
 | 
	
		
			
				|  |  | +        { label: "试听课", value: "DEMO" },
 | 
	
		
			
				|  |  | +        { label: "综合课", value: "COMPREHENSIVE" },
 | 
	
		
			
				|  |  | +        { label: "网管课", value: "PRACTICE" },
 | 
	
		
			
				|  |  | +        { label: "启蒙课", value: "ENLIGHTENMENT" },
 | 
	
		
			
				|  |  | +        { label: "集训单技课", value: "TRAINING_SINGLE" },
 | 
	
		
			
				|  |  | +        { label: "集训合奏课", value: "TRAINING_MIX" },
 | 
	
		
			
				|  |  | +        { label: "课堂课", value: "CLASSROOM" },
 | 
	
		
			
				|  |  | +        { label: "对外课", value: "COMM" }
 | 
	
		
			
				|  |  | +      ],
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        att: [
 | 
	
		
			
				|  |  |          { value: "NORMAL", label: "正常" },
 | 
	
		
			
				|  |  |          { value: "TRUANT", label: "旷课" },
 | 
	
		
			
				|  |  | -        { value: "LEAVE", label: "请假" },
 | 
	
		
			
				|  |  | +        { value: "LEAVE", label: "请假" }
 | 
	
		
			
				|  |  |        ],
 | 
	
		
			
				|  |  | -      courseStatus:courseStatus,
 | 
	
		
			
				|  |  | +      courseStatus: courseStatus,
 | 
	
		
			
				|  |  |        pageInfo: {
 | 
	
		
			
				|  |  |          // 分页规则
 | 
	
		
			
				|  |  |          limit: 10, // 限制显示条数
 | 
	
		
			
				|  |  |          page: 1, // 当前页
 | 
	
		
			
				|  |  |          total: 0, // 总条数
 | 
	
		
			
				|  |  |          page_size: [10, 20, 40, 50] // 选择限制显示条数
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  mounted () {
 | 
	
		
			
				|  |  | -    this.searchForm.studentId = this.$route.query.userId
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | +  mounted() {
 | 
	
		
			
				|  |  | +    this.searchForm.studentId = this.$route.query.userId;
 | 
	
		
			
				|  |  | +    this.getList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    activated() {
 | 
	
		
			
				|  |  | -    this.searchForm.studentId = this.$route.query.userId
 | 
	
		
			
				|  |  | -    this.getList()
 | 
	
		
			
				|  |  | +    this.searchForm.studentId = this.$route.query.userId;
 | 
	
		
			
				|  |  | +    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
 | 
	
		
			
				|  |  | +    getList() {
 | 
	
		
			
				|  |  | +      let params = this.searchForm;
 | 
	
		
			
				|  |  | +      params.rows = this.pageInfo.limit;
 | 
	
		
			
				|  |  | +      params.page = this.pageInfo.page;
 | 
	
		
			
				|  |  |        findStudentAttendances(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;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onReSet () { // 重置搜索
 | 
	
		
			
				|  |  | +    onReSet() {
 | 
	
		
			
				|  |  | +      // 重置搜索
 | 
	
		
			
				|  |  |        this.searchForm = {
 | 
	
		
			
				|  |  |          studentId: this.$route.query.userId,
 | 
	
		
			
				|  |  |          classGroupType: null,
 | 
	
		
			
				|  |  |          attendanceStatus: null,
 | 
	
		
			
				|  |  |          classGroupName: null,
 | 
	
		
			
				|  |  |          teacherName: null
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      this.getList()
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.getList();
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang="scss">
 | 
	
		
			
				|  |  |  </style>
 |