|
|
|
@ -132,25 +132,30 @@ export default { |
|
|
|
|
let data = { |
|
|
|
|
id: this.id, |
|
|
|
|
classId: this.classId, |
|
|
|
|
isRead: this.isRead == 1 ? '' : (this.isRead == 2 ? 0 : 1), //全部:'',已批阅:0,待批阅:1 |
|
|
|
|
isRead: this.isRead == 1 ? '' : (this.isRead == 2 ? 1 : 0), //全部:'',已批阅:1,待批阅:0 |
|
|
|
|
searchContent: this.encodeString(this.keyword), |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.getKdAchievement,data).then(res => { |
|
|
|
|
let list = res.data |
|
|
|
|
let score = 0 |
|
|
|
|
let already = 0 |
|
|
|
|
let not = 0 |
|
|
|
|
if(this.isRead == '1'){ |
|
|
|
|
let already = 0 |
|
|
|
|
let not = 0 |
|
|
|
|
list.map(n => { |
|
|
|
|
n.class = this.className |
|
|
|
|
if(!n.isRead){ |
|
|
|
|
not++ |
|
|
|
|
}else{ |
|
|
|
|
already++ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.already = already |
|
|
|
|
this.not = not |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
list.map(n => { |
|
|
|
|
n.class = this.className |
|
|
|
|
score += n.score |
|
|
|
|
if(!n.isRead){ |
|
|
|
|
already++ |
|
|
|
|
}else{ |
|
|
|
|
not++ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.already = already |
|
|
|
|
this.not = not |
|
|
|
|
|
|
|
|
|
this.listDataAll = list |
|
|
|
|
this.handlePage() |
|
|
|
|