|
@@ -1,156 +1,275 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<!-- 搜索类型 -->
|
|
|
- <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>
|
|
|
- </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>
|
|
|
- </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-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <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-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button @click="search"
|
|
|
- type="danger">搜索</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button @click="onReSet"
|
|
|
- type="primary">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ ref="searchForm"
|
|
|
+ :model="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ >
|
|
|
+ <el-form-item prop="teacherId">
|
|
|
+ <remote-search :commit='"setTeachers"' v-model='searchForm.teacherId' />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="musicGroupId">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="searchForm.musicGroupId"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="search"
|
|
|
+ placeholder="乐团编号"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="courseScheduleId">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="searchForm.courseScheduleId"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="search"
|
|
|
+ placeholder="课程编号"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="groupType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.groupType"
|
|
|
+ placeholder="请选择课程组类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in courseListType"
|
|
|
+ :key="index"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="courseScheduleType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.courseScheduleType"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择课程类型"
|
|
|
+ >
|
|
|
+ <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 prop="status">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.status"
|
|
|
+ placeholder="请选择考勤状态"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in attendanceStatus"
|
|
|
+ :key="index"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="dates" >
|
|
|
+ <el-date-picker
|
|
|
+ v-model="dates"
|
|
|
+ type="daterange"
|
|
|
+ style="width: 405px;"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="课程开始日期"
|
|
|
+ end-placeholder="课程结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button native-type="submit" type="danger">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="primary">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </save-form>
|
|
|
<div class="tableWrap">
|
|
|
- <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"
|
|
|
- prop="courseDate"
|
|
|
- width="150"
|
|
|
- label="上课时间">
|
|
|
- <template slot-scope="scope">{{ scope.row.courseDate | dateForMinFormat }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- prop="courseEndDate"
|
|
|
- label="下课时间"
|
|
|
- width="150">
|
|
|
- <template slot-scope="scope">{{ scope.row.courseEndDate | dateForMinFormat }}</template>
|
|
|
- </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.courseStatus | coursesStatus }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center"
|
|
|
- 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="当前课次">
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="tableList"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="courseSchedule.organization.name"
|
|
|
+ label="分部"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="username" label="学生姓名">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.username }}
|
|
|
+ <p style="color: #f56c6c">
|
|
|
+ (<copy-text>{{ scope.row.userId }}</copy-text
|
|
|
+ >)
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="courseSchedule.teacherName"
|
|
|
+ label="老师姓名"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.courseSchedule.teacherName }}
|
|
|
+ <p style="color: #f56c6c">
|
|
|
+ (<copy-text>{{ scope.row.teacherId }}</copy-text
|
|
|
+ >)
|
|
|
+ </p>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="musicGroupId"
|
|
|
+ label="乐团编号"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <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="考勤状态">
|
|
|
- <template slot-scope="scope">
|
|
|
- <!-- 因为未开始的课返回为旷课 产品要求写为未签到 -->
|
|
|
- <!-- v-if="scope.row.courseStatus != 'NOT_START'&&scope.row.attendanceStatus !='LEAVE'" -->
|
|
|
<div>
|
|
|
- <p>{{ scope.row.attendanceStatus | clockingIn }}</p>
|
|
|
- <!-- <p v-if="scope.row.courseStatus == 'NOT_START'&&scope.row.attendanceStatus !='LEAVE'">未签到</p> -->
|
|
|
+ <copy-text>{{ scope.row.musicGroupId }}</copy-text>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="
|
|
|
- center"
|
|
|
- label="教学模式">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>{{ scope.row.teachMode | teachMode }}</div>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="courseScheduleId"
|
|
|
+ label="课程编号"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <copy-text>{{ scope.row.courseScheduleId }}</copy-text>
|
|
|
+ </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" />
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="courseSchedule.name"
|
|
|
+ label="课程名称"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="courseSchedule.classDate"
|
|
|
+ label="上课日期"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.courseSchedule.classDate | dayjsFormat }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="startClassTime"
|
|
|
+ label="上课时间"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{
|
|
|
+ scope.row.courseSchedule.startClassTime | dayjsFormatMinute
|
|
|
+ }}-{{
|
|
|
+ scope.row.courseSchedule.endClassTime | dayjsFormatMinute
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="startClassTime"
|
|
|
+ label="课程组类型"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.groupType | coursesType }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="startClassTime"
|
|
|
+ label="课程类型"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.courseSchedule.type | coursesType }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="签到时间" width="180px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.signInTime }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="startClassTime"
|
|
|
+ width="180px"
|
|
|
+ label="签退时间"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.signOutTime }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="考勤状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.status | clockingIn }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="教学模式">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.courseSchedule.teachMode | teachMode }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ sync
|
|
|
+ :total.sync="pageInfo.total"
|
|
|
+ :page.sync="pageInfo.page"
|
|
|
+ :limit.sync="pageInfo.limit"
|
|
|
+ :page-sizes="pageInfo.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
-import { findStudentAttendances } from "@/api/studentManager";
|
|
|
-import { courseStatus, courseType } from "@/utils/searchArray";
|
|
|
+import { findStudentAttendance } from "@/api/buildTeam";
|
|
|
+import { getTimes } from "@/utils";
|
|
|
+import {
|
|
|
+ courseType,
|
|
|
+ courseListType,
|
|
|
+ attendanceStatus,
|
|
|
+} from "@/utils/searchArray";
|
|
|
export default {
|
|
|
name: "studentRecord",
|
|
|
components: { pagination },
|
|
|
data () {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
- studentId: null,
|
|
|
- courseScheduleType: null,
|
|
|
- attendanceStatus: null,
|
|
|
- classGroupName: null,
|
|
|
- teacherName: null,
|
|
|
- courseStatus: null
|
|
|
+ studentID: "",
|
|
|
+ groupType: "MUSIC",
|
|
|
+ musicGroupId: "",
|
|
|
+ courseScheduleId: "",
|
|
|
+ status: "",
|
|
|
+ teacherId:'',
|
|
|
+ courseScheduleType:''
|
|
|
},
|
|
|
+ dates:[],
|
|
|
searchLsit: [],
|
|
|
tableList: [],
|
|
|
- courseArray: courseType,
|
|
|
- att: [
|
|
|
- { value: "NORMAL", label: "正常" },
|
|
|
- { value: "TRUANT", label: "旷课" },
|
|
|
- { value: "LEAVE", label: "请假" }
|
|
|
- ],
|
|
|
- courseStatus: courseStatus,
|
|
|
+ courseType,
|
|
|
+ courseListType,
|
|
|
+ attendanceStatus,
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -161,11 +280,11 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted () {
|
|
|
- this.searchForm.studentId = this.$route.query.userId;
|
|
|
+ this.searchForm.studentID = this.$route.query.userId;
|
|
|
this.getList();
|
|
|
},
|
|
|
activated () {
|
|
|
- this.searchForm.studentId = this.$route.query.userId;
|
|
|
+ this.searchForm.studentID = this.$route.query.userId;
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -174,10 +293,13 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
getList () {
|
|
|
- let params = this.searchForm;
|
|
|
- params.rows = this.pageInfo.limit;
|
|
|
- params.page = this.pageInfo.page;
|
|
|
- findStudentAttendances(params).then(res => {
|
|
|
+ let obj = {
|
|
|
+ page: this.pageInfo.page,
|
|
|
+ rows: this.pageInfo.limit,
|
|
|
+ ...this.searchForm,
|
|
|
+ ...getTimes(this.dates, ["startDateOfCourse", "endDateOfCourse"],'YYYY-MM-DD'),
|
|
|
+ };
|
|
|
+ findStudentAttendance(obj).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = res.data.rows;
|
|
|
this.pageInfo.total = res.data.total;
|