|
|
|
|
@ -138,8 +138,8 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isShow: false,
|
|
|
|
|
course_content_check_count:0,
|
|
|
|
|
course_content_check_count_no:0,
|
|
|
|
|
course_content_check_count: 0,
|
|
|
|
|
course_content_check_count_no: 0,
|
|
|
|
|
searchForm: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
@ -148,11 +148,10 @@ export default {
|
|
|
|
|
has_check: ''
|
|
|
|
|
},
|
|
|
|
|
tableReqOpt: {
|
|
|
|
|
course_id: this.courseId,
|
|
|
|
|
course_content_id: this.courseContentId || ''
|
|
|
|
|
course_id: this.courseId
|
|
|
|
|
},
|
|
|
|
|
list:[],
|
|
|
|
|
total:0,
|
|
|
|
|
list: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
tableColumns: [
|
|
|
|
|
{
|
|
|
|
|
prop: 'user.name',
|
|
|
|
|
@ -196,7 +195,11 @@ export default {
|
|
|
|
|
this.tableReqOpt.course_id = newVal
|
|
|
|
|
},
|
|
|
|
|
courseContentId(newVal) {
|
|
|
|
|
this.tableReqOpt.course_content_id = newVal || ''
|
|
|
|
|
if (newVal) {
|
|
|
|
|
this.tableReqOpt.course_content_id = newVal
|
|
|
|
|
} else {
|
|
|
|
|
delete this.tableReqOpt.course_content_id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -227,8 +230,10 @@ export default {
|
|
|
|
|
handleReset() {
|
|
|
|
|
this.resetForm()
|
|
|
|
|
this.tableReqOpt = {
|
|
|
|
|
course_id: this.courseId,
|
|
|
|
|
course_content_id: this.courseContentId || ''
|
|
|
|
|
course_id: this.courseId
|
|
|
|
|
}
|
|
|
|
|
if (this.courseContentId) {
|
|
|
|
|
this.tableReqOpt.course_content_id = this.courseContentId
|
|
|
|
|
}
|
|
|
|
|
this.refreshTable()
|
|
|
|
|
},
|
|
|
|
|
@ -252,7 +257,6 @@ export default {
|
|
|
|
|
const exportParams = {
|
|
|
|
|
...this.searchForm,
|
|
|
|
|
course_id: this.courseId,
|
|
|
|
|
course_content_id: this.courseContentId || '',
|
|
|
|
|
export_fields: exportFields,
|
|
|
|
|
is_export: 1,
|
|
|
|
|
clear: 1,
|
|
|
|
|
@ -260,6 +264,11 @@ export default {
|
|
|
|
|
page_size: 999
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 只有在有课表ID时才传入course_content_id
|
|
|
|
|
if (this.courseContentId) {
|
|
|
|
|
exportParams.course_content_id = this.courseContentId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 生成文件名
|
|
|
|
|
let fileName = '签到记录'
|
|
|
|
|
if (this.courseInfo && this.courseInfo.name) {
|
|
|
|
|
@ -295,11 +304,17 @@ export default {
|
|
|
|
|
|
|
|
|
|
// 获取签到列表数据
|
|
|
|
|
async fetchSignList(params) {
|
|
|
|
|
const res = await getSignList({
|
|
|
|
|
const requestParams = {
|
|
|
|
|
...this.searchForm,
|
|
|
|
|
course_id: this.courseId,
|
|
|
|
|
course_content_id: this.courseContentId || '',
|
|
|
|
|
})
|
|
|
|
|
course_id: this.courseId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 只有在有课表ID时才传入course_content_id
|
|
|
|
|
if (this.courseContentId) {
|
|
|
|
|
requestParams.course_content_id = this.courseContentId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const res = await getSignList(requestParams)
|
|
|
|
|
this.list = res.list.data
|
|
|
|
|
this.course_content_check_count = res.course_content_check_count
|
|
|
|
|
this.course_content_check_count_no = res.total - res.course_content_check_count
|
|
|
|
|
|