|
@@ -70,7 +70,7 @@ export default {
|
|
|
async searchInfo() {
|
|
|
let res = await this.teacherInfo(this.teaid);
|
|
|
this.$set(this, `teacherinfo`, res.data);
|
|
|
- res = await this.modelFetch({ model: 'score', stuid: this.user.id, lessonid: this.lessonid, teacherid: this.teaid });
|
|
|
+ res = await this.modelFetch({ model: 'score', stuid: this.user.userid, lessonid: this.lessonid, teacherid: this.teaid });
|
|
|
if (res.errcode == 0) {
|
|
|
console.log(res.data);
|
|
|
let data = res.data;
|
|
@@ -81,7 +81,7 @@ export default {
|
|
|
},
|
|
|
// 为教师打分
|
|
|
async onsave({ data }) {
|
|
|
- if (data) {
|
|
|
+ if (data.id) {
|
|
|
let res = await this.update(data);
|
|
|
this.$notify({
|
|
|
message: '修改评分成功',
|
|
@@ -92,7 +92,7 @@ export default {
|
|
|
this.searchInfo();
|
|
|
} else {
|
|
|
this.disabled = true;
|
|
|
- data.stuid = this.user.id;
|
|
|
+ data.stuid = this.user.userid;
|
|
|
data.lessonid = this.lessonid;
|
|
|
data.teacherid = this.teaid;
|
|
|
const res = await this.create(data);
|