|
@@ -4,7 +4,7 @@
|
|
<el-form :inline="true"
|
|
<el-form :inline="true"
|
|
class="searchForm"
|
|
class="searchForm"
|
|
v-model="searchForm">
|
|
v-model="searchForm">
|
|
- <el-form-item label="课程类型">
|
|
|
|
|
|
+ <el-form-item>
|
|
<el-select v-model="searchForm.courseStatus"
|
|
<el-select v-model="searchForm.courseStatus"
|
|
clearable
|
|
clearable
|
|
filterable
|
|
filterable
|
|
@@ -25,7 +25,7 @@
|
|
value="SINGLE"></el-option>
|
|
value="SINGLE"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="课程状态">
|
|
|
|
|
|
+ <el-form-item>
|
|
<el-select v-model="searchForm.classStatus"
|
|
<el-select v-model="searchForm.classStatus"
|
|
clearable
|
|
clearable
|
|
filterable
|
|
filterable
|
|
@@ -38,9 +38,10 @@
|
|
value="OVER"></el-option>
|
|
value="OVER"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="班级名称">
|
|
|
|
|
|
+ <el-form-item >
|
|
<!-- getMusicGroupAllClass -->
|
|
<!-- getMusicGroupAllClass -->
|
|
<el-select v-model="searchForm.class"
|
|
<el-select v-model="searchForm.class"
|
|
|
|
+ placeholder="班级名称"
|
|
filterable
|
|
filterable
|
|
clearable>
|
|
clearable>
|
|
<el-option v-for='(item,index) in classList'
|
|
<el-option v-for='(item,index) in classList'
|
|
@@ -49,7 +50,16 @@
|
|
:label="item.name"></el-option>
|
|
:label="item.name"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="选择日期">
|
|
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-select v-model="searchForm.isSettlement"
|
|
|
|
+ placeholder="是否结算"
|
|
|
|
+ filterable
|
|
|
|
+ clearable>
|
|
|
|
+ <el-option value="0" label="未结算"></el-option>
|
|
|
|
+ <el-option value="1" label="已结算"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
<el-date-picker v-model="searchForm.timer"
|
|
<el-date-picker v-model="searchForm.timer"
|
|
style="width:420px;"
|
|
style="width:420px;"
|
|
type="daterange"
|
|
type="daterange"
|
|
@@ -83,6 +93,7 @@
|
|
width="55"
|
|
width="55"
|
|
:selectable="checkSelectable"></el-table-column>
|
|
:selectable="checkSelectable"></el-table-column>
|
|
<el-table-column align='center'
|
|
<el-table-column align='center'
|
|
|
|
+ width="180px"
|
|
label="时间">
|
|
label="时间">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.classDate }} {{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 5) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(0, 5) : '' }}
|
|
{{ scope.row.classDate }} {{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 5) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(0, 5) : '' }}
|
|
@@ -136,21 +147,24 @@
|
|
label="指导老师">
|
|
label="指导老师">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align='center'
|
|
<el-table-column align='center'
|
|
- prop="masterTeacherName"
|
|
|
|
|
|
+ label="结算状态">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ scope.row.settlementTime ? '已结算' : '未结算' }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align='center'
|
|
|
|
+ prop="remark"
|
|
label="备注">
|
|
label="备注">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- <el-table-column align='center'
|
|
|
|
- prop="subTeacherName"
|
|
|
|
- label="助教老师">
|
|
|
|
- </el-table-column> -->
|
|
|
|
<el-table-column align='center'
|
|
<el-table-column align='center'
|
|
|
|
+ width="180px"
|
|
label="操作">
|
|
label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
<div>
|
|
- <el-button v-if="scope.row.courseScheduleStatus == 'OVER'"
|
|
|
|
|
|
+ <el-button v-if="scope.row.courseScheduleStatus == 'OVER' && !scope.row.settlementTime && permission('teacherAttendance/updateTeacherAttendance')"
|
|
type="text" @click="onMarkAttendance(scope.row)">补考勤</el-button>
|
|
type="text" @click="onMarkAttendance(scope.row)">补考勤</el-button>
|
|
- <el-button v-if="scope.row.courseScheduleStatus == 'OVER'"
|
|
|
|
- type="text" @click="rollCall.status = true">点名表</el-button>
|
|
|
|
|
|
+ <el-button v-if="scope.row.courseScheduleStatus == 'OVER' && !scope.row.settlementTime && permission('studentAttendance/updateStudentAttendances')"
|
|
|
|
+ type="text" @click="onCallName(scope.row)">点名表</el-button>
|
|
<!-- OVER -->
|
|
<!-- OVER -->
|
|
<el-button v-if="scope.row.courseScheduleStatus == 'OVER' && permission('courseSchedule/classStartDateAdjust1')" type="text" @click="resetClass(scope.row)">调整</el-button>
|
|
<el-button v-if="scope.row.courseScheduleStatus == 'OVER' && permission('courseSchedule/classStartDateAdjust1')" type="text" @click="resetClass(scope.row)">调整</el-button>
|
|
<el-button v-if="scope.row.courseScheduleStatus == 'NOT_START' && permission('courseSchedule/classStartDateAdjust')" type="text" @click="resetClass(scope.row)">调整</el-button>
|
|
<el-button v-if="scope.row.courseScheduleStatus == 'NOT_START' && permission('courseSchedule/classStartDateAdjust')" type="text" @click="resetClass(scope.row)">调整</el-button>
|
|
@@ -282,25 +296,34 @@
|
|
width="700px"
|
|
width="700px"
|
|
:visible.sync="rollCall.status">
|
|
:visible.sync="rollCall.status">
|
|
<el-table :data="rollCall.gridData">
|
|
<el-table :data="rollCall.gridData">
|
|
- <el-table-column property="date" label="学员姓名"></el-table-column>
|
|
|
|
- <el-table-column property="name" label="手机号"></el-table-column>
|
|
|
|
- <el-table-column property="address" label="学员声部"></el-table-column>
|
|
|
|
- <el-table-column property="address" label="到课状态"></el-table-column>
|
|
|
|
- <el-table-column label="操作">
|
|
|
|
|
|
+ <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">
|
|
<template slot-scope="scope">
|
|
- <el-button size="small" type="primary" plain>主要按钮</el-button>
|
|
|
|
- <el-button size="small" type="success" plain>成功按钮</el-button>
|
|
|
|
- <el-button size="small" type="info" plain>信息按钮</el-button>
|
|
|
|
|
|
+ {{ 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>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ <pagination :total="rollCall.total"
|
|
|
|
+ :page.sync="rollCall.page"
|
|
|
|
+ :limit.sync="rollCall.limit"
|
|
|
|
+ :page-sizes="rollCall.page_size"
|
|
|
|
+ @pagination="getCallName" />
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import pagination from '@/components/Pagination/index'
|
|
import pagination from '@/components/Pagination/index'
|
|
import { bathDelete } from '@/api/vipSeting'
|
|
import { bathDelete } from '@/api/vipSeting'
|
|
-import { getCourseList, findMusicGroupClassTeacher, resetCourse, getTeacher, getMusicGroupAllClass, getCourseSchedule, batchAdjustment } from '@/api/buildTeam'
|
|
|
|
|
|
+import { getCourseList, findMusicGroupClassTeacher, resetCourse, getTeacher, getMusicGroupAllClass, getCourseSchedule, batchAdjustment, updateTeacherAttendance, findAttendanceStudentByCourseWithPage, updateStudentAttendances } from '@/api/buildTeam'
|
|
import { permission } from '@/utils/directivePage'
|
|
import { permission } from '@/utils/directivePage'
|
|
export default {
|
|
export default {
|
|
name: 'tcourseList',
|
|
name: 'tcourseList',
|
|
@@ -313,7 +336,8 @@ export default {
|
|
courseStatus: '', // 课程类型
|
|
courseStatus: '', // 课程类型
|
|
classStatus: '', // 课程状态
|
|
classStatus: '', // 课程状态
|
|
timer: [], // 时间
|
|
timer: [], // 时间
|
|
- class: ''
|
|
|
|
|
|
+ class: '',
|
|
|
|
+ isSettlement: ''
|
|
},
|
|
},
|
|
tableList: [],
|
|
tableList: [],
|
|
searchLsit: [],
|
|
searchLsit: [],
|
|
@@ -350,7 +374,12 @@ export default {
|
|
},
|
|
},
|
|
rollCall: { // 点名表
|
|
rollCall: { // 点名表
|
|
status: false,
|
|
status: false,
|
|
- gridData: []
|
|
|
|
|
|
+ gridData: [],
|
|
|
|
+ selectItem: {}, // 选中状态
|
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
|
+ page: 1, // 当前页
|
|
|
|
+ total: 0, // 总条数
|
|
|
|
+ page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -392,6 +421,45 @@ export default {
|
|
dataInfo: item
|
|
dataInfo: item
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ 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.courseScheduleId
|
|
|
|
+ }
|
|
|
|
+ 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.courseScheduleId,
|
|
|
|
+ studentAttendances:[{
|
|
|
|
+ userId: row.studentId,
|
|
|
|
+ status: type
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
|
|
+ updateStudentAttendances(params).then(res => {
|
|
|
|
+ if(res.code == 200) {
|
|
|
|
+ this.$message.success('修改成功')
|
|
|
|
+ row.status = type
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.msg)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
permission (str) {
|
|
permission (str) {
|
|
return permission(str)
|
|
return permission(str)
|
|
},
|
|
},
|
|
@@ -400,18 +468,20 @@ export default {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
getList () {
|
|
getList () {
|
|
- if (!this.searchForm.timer) {
|
|
|
|
- this.searchForm.timer = []
|
|
|
|
|
|
+ let searchForm = this.searchForm
|
|
|
|
+ if (!searchForm.timer) {
|
|
|
|
+ searchForm.timer = []
|
|
}
|
|
}
|
|
let obj = {
|
|
let obj = {
|
|
- classScheduleStatus: this.searchForm.classStatus || null,
|
|
|
|
- classScheduleType: this.searchForm.courseStatus || null,
|
|
|
|
|
|
+ classScheduleStatus: searchForm.classStatus || null,
|
|
|
|
+ classScheduleType: searchForm.courseStatus || null,
|
|
musicGroupId: this.teamid,
|
|
musicGroupId: this.teamid,
|
|
- startTime: this.searchForm.timer[0] || null,
|
|
|
|
- endTime: this.searchForm.timer[1] || null,
|
|
|
|
- page: this.rules.page, rows: this.rules.limit,
|
|
|
|
- classGroupId: this.searchForm.class || null
|
|
|
|
-
|
|
|
|
|
|
+ startTime: searchForm.timer[0] || null,
|
|
|
|
+ endTime: searchForm.timer[1] || null,
|
|
|
|
+ page: this.rules.page,
|
|
|
|
+ rows: this.rules.limit,
|
|
|
|
+ classGroupId: searchForm.class || null,
|
|
|
|
+ isSettlement: searchForm.isSettlement || null
|
|
}
|
|
}
|
|
getCourseSchedule(obj).then(res => {
|
|
getCourseSchedule(obj).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -524,14 +594,20 @@ export default {
|
|
return val.courseScheduleStatus == 'NOT_START'
|
|
return val.courseScheduleStatus == 'NOT_START'
|
|
},
|
|
},
|
|
batchAdjustmentTime () {
|
|
batchAdjustmentTime () {
|
|
- let arr = [];
|
|
|
|
- arr = this.activeCourseList.map(item => {
|
|
|
|
- return { classDate: this.timerMask.timer, id: item.courseScheduleId, endClassTimeStr: item.endClassTimeStr, startClassTimeStr: item.startClassTimeStr };
|
|
|
|
- })
|
|
|
|
- batchAdjustment(arr).then(res => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.timerVisible = false;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ let tempData = this.markAttendance.dataInfo
|
|
|
|
+ let params = {
|
|
|
|
+ "teacherId": tempData.masterTeacherId,
|
|
|
|
+ "courseScheduleId": tempData.courseScheduleId,
|
|
|
|
+ "signInStatus": 1,
|
|
|
|
+ "signOutStatus": 1
|
|
|
|
+ }
|
|
|
|
+ updateTeacherAttendance(params).then(res => {
|
|
|
|
+ if(res.code == 200) {
|
|
|
|
+ this.$message.success('补卡成功')
|
|
|
|
+ this.markAttendance.status = false
|
|
|
|
+ this.getList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.msg)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -545,9 +621,19 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.timerVisible = true;
|
|
this.timerVisible = true;
|
|
- },
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ filters: {
|
|
|
|
+ studentCallName: value => {
|
|
|
|
+ let template = {
|
|
|
|
+ NORMAL: "到课",
|
|
|
|
+ TRUANT: "未到",
|
|
|
|
+ LEAVE: "请假",
|
|
|
|
+ DROP_OUT: "退学",
|
|
|
|
+ '': '未到'
|
|
|
|
+ }
|
|
|
|
+ return template[value]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|