lion 4 months ago
parent 801d60fe27
commit 129f38d53c

@ -149,7 +149,8 @@
isShow: false,
type: 'add',
id: '',
teacher_options: [],
teacher_options: [],
isAddress:false,
mapparams: {
zoom: 11
},
@ -316,7 +317,8 @@
this.getDetail()
}
} else {
this.id = ''
this.id = ''
this.isAddress = false
this.mapform = []
this.form = {
date: '',

@ -85,7 +85,8 @@
</div>
</div>
</div>
</div>
</div>
<editClass ref="editClass" @refresh="getCousreContent"></editClass>
</div>
</template>
@ -96,11 +97,19 @@
import {
index as courseContentGet,
qrcodeGet
} from '@/api/course/courseContent.js'
} 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',
name: 'CourseQr',
components:{
editClass
},
data() {
return {
return {
teacher_options:[],
courseContentList: [],
courseList: [],
course_id: '',
@ -119,7 +128,8 @@
}
},
created() {
this.getCourse()
this.getCourse()
this.getTeachers()
},
methods: {
//
@ -178,9 +188,28 @@
})
this.courseContentList = res.data
},
selectCourse(course) {
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({

Loading…
Cancel
Save