diff --git a/src/components/achievement/index.vue b/src/components/achievement/index.vue index faec4c24de2b468d6c74a2daf849705668173e67..391bbcf3dd0cb844d67192d4e216d98c13605565 100644 --- a/src/components/achievement/index.vue +++ b/src/components/achievement/index.vue @@ -224,7 +224,28 @@ } } getTeacherRankListApi(json).then(res=>{ - this.firstList = res; + if(res.length>0){ + let obj = { + teacher_name:'总计', + total_money:0, + one_to_two:0, + one_year:0, + three_month:0, + two_year:0, + tid:0 + } + res.forEach(el => { + obj.total_money+=Number(el.total_money) + obj.one_to_two+=el.one_to_two + obj.one_year+=el.one_year + obj.three_month+=el.three_month + obj.two_year+=el.two_year + obj.tid+=el.tid + }); + obj.total_money = obj.total_money+'.00' + res.unshift(obj) + this.firstList = res; + } }) }, searchSecondPage(){