|
|
|
|
@ -86,6 +86,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<editClass ref="editClass" @refresh="getCousreContent"></editClass>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -97,10 +98,18 @@
|
|
|
|
|
index as courseContentGet,
|
|
|
|
|
qrcodeGet
|
|
|
|
|
} from '@/api/course/courseContent.js'
|
|
|
|
|
import editClass from "@/views/course/components/editClass.vue"
|
|
|
|
|
import {
|
|
|
|
|
index as teacherIndex
|
|
|
|
|
} from "@/api/info/teachers.js"
|
|
|
|
|
export default {
|
|
|
|
|
name: 'CourseQr',
|
|
|
|
|
components:{
|
|
|
|
|
editClass
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
teacher_options:[],
|
|
|
|
|
courseContentList: [],
|
|
|
|
|
courseList: [],
|
|
|
|
|
course_id: '',
|
|
|
|
|
@ -120,6 +129,7 @@
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getCourse()
|
|
|
|
|
this.getTeachers()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 获取进行中的 课程
|
|
|
|
|
@ -178,10 +188,29 @@
|
|
|
|
|
})
|
|
|
|
|
this.courseContentList = res.data
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getCousreContent(){
|
|
|
|
|
this.getCourseContent(this.course_id,this.course_date)
|
|
|
|
|
},
|
|
|
|
|
selectCourse(course) {
|
|
|
|
|
if(!course.latitude || !course.longitude){
|
|
|
|
|
this.$message.warning("该课表还未设置签到点位,请先设置");
|
|
|
|
|
|
|
|
|
|
this.$refs.editClass.type = 'editor'
|
|
|
|
|
this.$refs.editClass.id = course.id
|
|
|
|
|
this.$refs.editClass.setTeachers(this.teacher_options)
|
|
|
|
|
this.$refs.editClass.isAddress = true
|
|
|
|
|
this.$refs.editClass.isShow = true
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.selectedCourse = course
|
|
|
|
|
},
|
|
|
|
|
async getTeachers() {
|
|
|
|
|
const res = await teacherIndex({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 999
|
|
|
|
|
})
|
|
|
|
|
this.teacher_options = res.data
|
|
|
|
|
},
|
|
|
|
|
async renderQRCode(id) {
|
|
|
|
|
const res = await qrcodeGet({
|
|
|
|
|
id:id
|
|
|
|
|
|