|
@@ -108,6 +108,8 @@
|
|
|
>更换老师</el-button>
|
|
|
<el-button v-if="scope.row.status == 'OVER' && scope.row.isSettlement == 0 && permission('teacherAttendance/updateTeacherAttendance', '/accompanys')" type="text" @click="onMarkAttendance(scope.row)"
|
|
|
>补考勤</el-button>
|
|
|
+ <!-- && permission('studentAttendance/updateStudentAttendances', '/accompanys') -->
|
|
|
+ <el-button v-if="scope.row.status == 'OVER' && scope.row.isSettlement == 0 && permission('studentAttendance/updateStudentAttendances', '/accompanys')" type="text" @click="onCallName(scope.row)">点名表</el-button>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
v-if="!scope.row.isSettlement && permission('accompanys/cleanAttendance')"
|
|
@@ -245,8 +247,7 @@
|
|
|
title="课程组调整"
|
|
|
width="400px"
|
|
|
:before-close="teacherClose"
|
|
|
- :visible.sync="teacherVisible"
|
|
|
- >
|
|
|
+ :visible.sync="teacherVisible">
|
|
|
<el-form
|
|
|
:model="teacherForm"
|
|
|
ref="teacherForm"
|
|
@@ -381,6 +382,51 @@
|
|
|
<el-button type="primary" v-show="isaddCourse" @click="addCourseSubmit">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title='点名表'
|
|
|
+ width="700px"
|
|
|
+ :visible.sync="rollCall.status">
|
|
|
+ <el-table :data="rollCall.gridData">
|
|
|
+ <el-table-column align='center'
|
|
|
+ property="userName"
|
|
|
+ label="学员姓名"></el-table-column>
|
|
|
+ <el-table-column align='center'
|
|
|
+ property="phone"
|
|
|
+ label="手机号"></el-table-column>
|
|
|
+ <el-table-column align='center'
|
|
|
+ property="subjectName"
|
|
|
+ label="学员声部"></el-table-column>
|
|
|
+ <el-table-column align='center'
|
|
|
+ label="到课状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.status | studentCallName }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align='center'
|
|
|
+ label="操作"
|
|
|
+ width="220px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="small"
|
|
|
+ @click="onChangeRollCall('TRUANT', scope.row)"
|
|
|
+ type="primary"
|
|
|
+ round>未到</el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ @click="onChangeRollCall('LEAVE', scope.row)"
|
|
|
+ type="warning"
|
|
|
+ round>请假</el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ @click="onChangeRollCall('NORMAL', scope.row)"
|
|
|
+ type="success"
|
|
|
+ round>到课</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination :total="rollCall.total"
|
|
|
+ :page.sync="rollCall.page"
|
|
|
+ :limit.sync="rollCall.limit"
|
|
|
+ :page-sizes="rollCall.page_size"
|
|
|
+ @pagination="getCallName" />
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -401,7 +447,9 @@ import {
|
|
|
findEducationUsers,
|
|
|
updateTeacherAttendance,
|
|
|
superFindCourseSchedules,
|
|
|
- updateCoursesExpireDate
|
|
|
+ updateCoursesExpireDate,
|
|
|
+ findAttendanceStudentByCourseWithPage,
|
|
|
+ updateStudentAttendances
|
|
|
} from "@/api/buildTeam";
|
|
|
import {
|
|
|
vipCourseAdjust,
|
|
@@ -517,7 +565,16 @@ export default {
|
|
|
status: false,
|
|
|
dataInfo: {}
|
|
|
},
|
|
|
- bigin: this.beginDate()
|
|
|
+ bigin: this.beginDate(),
|
|
|
+ rollCall: { // 点名表
|
|
|
+ status: false,
|
|
|
+ gridData: [],
|
|
|
+ selectItem: {}, // 选中状态
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -563,6 +620,55 @@ export default {
|
|
|
this.getCourseGroup();
|
|
|
this.getList();
|
|
|
},
|
|
|
+ onCallName (item) { // 点名表
|
|
|
+ this.rollCall.page = 1
|
|
|
+ this.rollCall.selectItem = item
|
|
|
+ this.getCallName()
|
|
|
+ },
|
|
|
+ getCallName () {
|
|
|
+ let rollCall = this.rollCall
|
|
|
+ let params = {
|
|
|
+ page: rollCall.page,
|
|
|
+ rows: rollCall.limit,
|
|
|
+ courseScheduleId: rollCall.selectItem.id
|
|
|
+ }
|
|
|
+ findAttendanceStudentByCourseWithPage(params).then(res => {
|
|
|
+ let result = res.data
|
|
|
+ rollCall.status = true
|
|
|
+ if (res.code == 200) {
|
|
|
+ rollCall.gridData = result.rows
|
|
|
+ rollCall.total = result.total
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onChangeRollCall (type, row) {
|
|
|
+ let rollCall = this.rollCall
|
|
|
+ let params = {
|
|
|
+ courseScheduleId: rollCall.selectItem.id,
|
|
|
+ studentAttendances: [{
|
|
|
+ userId: row.studentId,
|
|
|
+ status: type
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ updateStudentAttendances(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ row.status = type
|
|
|
+ this.getList()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ lookStudents (row) {
|
|
|
+ let id = row.id;
|
|
|
+ getStudyStudents({ courseScheduleId: id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.studentList = res.data;
|
|
|
+ this.studentVisible = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getCourseGroup() {
|
|
|
practiceGroupManage({ search: this.practiceId }).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -956,6 +1062,18 @@ export default {
|
|
|
|
|
|
// }
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ studentCallName: value => {
|
|
|
+ let template = {
|
|
|
+ NORMAL: "到课",
|
|
|
+ TRUANT: "未到",
|
|
|
+ LEAVE: "请假",
|
|
|
+ DROP_OUT: "退学",
|
|
|
+ '': '未到'
|
|
|
+ }
|
|
|
+ return template[value]
|
|
|
+ }
|
|
|
+ },
|
|
|
watch: {
|
|
|
adjustmentVisible(val) {
|
|
|
if (!val) {
|