|
@@ -7,7 +7,7 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <mainData :teacherinfo="teacherinfo" :form="form" @onsave="onsave"></mainData>
|
|
|
+ <mainData :teacherinfo="teacherinfo" :grade="grade" :form="form" @onsave="onsave"></mainData>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="foot">
|
|
|
<footInfo></footInfo>
|
|
@@ -36,6 +36,7 @@ export default {
|
|
|
data: () => ({
|
|
|
teacherinfo: {},
|
|
|
form: {},
|
|
|
+ grade: {},
|
|
|
title: '',
|
|
|
isleftarrow: '',
|
|
|
transitionName: 'fade',
|
|
@@ -48,6 +49,12 @@ export default {
|
|
|
id() {
|
|
|
return this.$route.query.id;
|
|
|
},
|
|
|
+ lessonid() {
|
|
|
+ return this.$route.query.lessonid;
|
|
|
+ },
|
|
|
+ subid() {
|
|
|
+ return this.$route.query.subid;
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|
|
@@ -66,9 +73,16 @@ export default {
|
|
|
async searchInfo() {
|
|
|
const res = await this.teacherInfo(this.id);
|
|
|
console.log(res);
|
|
|
+ let b = parseInt(res.data.xsscore);
|
|
|
this.$set(this, `teacherinfo`, res.data);
|
|
|
+ this.$set(this, `grade`, b);
|
|
|
},
|
|
|
async onsave(form) {
|
|
|
+ this.form.teacherid = this.id;
|
|
|
+ this.form.lessonid = this.lessonid;
|
|
|
+ let site = JSON.parse(sessionStorage.getItem('site'));
|
|
|
+ this.form.stuid = site.id;
|
|
|
+ console.log(site.id);
|
|
|
let data = this.form;
|
|
|
let res = await this.create(data);
|
|
|
console.log('成功');
|