|
@@ -55,13 +55,13 @@ export default {
|
|
|
let res = await this.query({ lessonid: this.lessonid, teacherid: this.teacherid, ...info });
|
|
|
if (res.errcode === 0) {
|
|
|
let nd = _.uniqBy(res.data, 'stuid');
|
|
|
- nd = nd.filter(f => this.stuList.find(sf => sf._id === f.stuid));
|
|
|
+ nd = nd.filter(f => this.stuList.find(sf => sf._id === f.stuid) && f.score);
|
|
|
this.$set(this, `list`, nd);
|
|
|
this.$set(this, `total`, res.total);
|
|
|
// 教师总分
|
|
|
let teatotal = nd.reduce((p, n) => p + (n['score'] * 1 || 0), 0);
|
|
|
// 教师平均分
|
|
|
- let teapinjuntotal = _.round(teatotal / this.stutotal, 2);
|
|
|
+ let teapinjuntotal = _.round(teatotal / nd.length, 2);
|
|
|
let data = {
|
|
|
teatotal: teatotal,
|
|
|
teapinjuntotal: teapinjuntotal,
|