签到记录

master
lion 3 months ago
parent 2ea419ab1e
commit e4d8705de7

@ -138,8 +138,8 @@ export default {
data() { data() {
return { return {
isShow: false, isShow: false,
course_content_check_count:0, course_content_check_count: 0,
course_content_check_count_no:0, course_content_check_count_no: 0,
searchForm: { searchForm: {
page: 1, page: 1,
page_size: 10, page_size: 10,
@ -148,11 +148,10 @@ export default {
has_check: '' has_check: ''
}, },
tableReqOpt: { tableReqOpt: {
course_id: this.courseId, course_id: this.courseId
course_content_id: this.courseContentId || ''
}, },
list:[], list: [],
total:0, total: 0,
tableColumns: [ tableColumns: [
{ {
prop: 'user.name', prop: 'user.name',
@ -196,7 +195,11 @@ export default {
this.tableReqOpt.course_id = newVal this.tableReqOpt.course_id = newVal
}, },
courseContentId(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: { methods: {
@ -227,8 +230,10 @@ export default {
handleReset() { handleReset() {
this.resetForm() this.resetForm()
this.tableReqOpt = { this.tableReqOpt = {
course_id: this.courseId, course_id: this.courseId
course_content_id: this.courseContentId || '' }
if (this.courseContentId) {
this.tableReqOpt.course_content_id = this.courseContentId
} }
this.refreshTable() this.refreshTable()
}, },
@ -252,7 +257,6 @@ export default {
const exportParams = { const exportParams = {
...this.searchForm, ...this.searchForm,
course_id: this.courseId, course_id: this.courseId,
course_content_id: this.courseContentId || '',
export_fields: exportFields, export_fields: exportFields,
is_export: 1, is_export: 1,
clear: 1, clear: 1,
@ -260,6 +264,11 @@ export default {
page_size: 999 page_size: 999
} }
// IDcourse_content_id
if (this.courseContentId) {
exportParams.course_content_id = this.courseContentId
}
// //
let fileName = '签到记录' let fileName = '签到记录'
if (this.courseInfo && this.courseInfo.name) { if (this.courseInfo && this.courseInfo.name) {
@ -295,11 +304,17 @@ export default {
// //
async fetchSignList(params) { async fetchSignList(params) {
const res = await getSignList({ const requestParams = {
...this.searchForm, ...this.searchForm,
course_id: this.courseId, course_id: this.courseId
course_content_id: this.courseContentId || '', }
})
// IDcourse_content_id
if (this.courseContentId) {
requestParams.course_content_id = this.courseContentId
}
const res = await getSignList(requestParams)
this.list = res.list.data this.list = res.list.data
this.course_content_check_count = res.course_content_check_count this.course_content_check_count = res.course_content_check_count
this.course_content_check_count_no = res.total - res.course_content_check_count this.course_content_check_count_no = res.total - res.course_content_check_count

@ -174,7 +174,7 @@
<signList <signList
ref="signList" ref="signList"
:course-id="course_id" :course-id="course_id"
:course-content-id="selectedCourse ? selectedCourse.id : null" :course-content-id="is_arrange === 1 ? (selectedCourse ? selectedCourse.id : null) : null"
:course-info="is_arrange === 0 ? selectedCourse : null" :course-info="is_arrange === 0 ? selectedCourse : null"
:schedule-info="is_arrange === 1 ? selectedCourse : null" :schedule-info="is_arrange === 1 ? selectedCourse : null"
/> />

Loading…
Cancel
Save