|
|
@@ -123,13 +123,23 @@
|
|
|
//分数合并
|
|
|
setTotalScore() {
|
|
|
for (let i = 0; i < this.dataUsers_all.length; i++) {
|
|
|
+
|
|
|
let totalScore = 0;
|
|
|
- for (let j = 0; j < this.dataUsers_all[i].UserScore.length; j++) {
|
|
|
- let ascore = Number(this.dataUsers_all[i].UserScore[j]);
|
|
|
- if (ascore) {
|
|
|
- totalScore += ascore;
|
|
|
+
|
|
|
+ if(this.dataUsers_all[i].UserScore!="")
|
|
|
+ {
|
|
|
+ let UserScore = JSON.parse(this.dataUsers_all[i].UserScore);
|
|
|
+
|
|
|
+ for (let j = 0; j < UserScore.length; j++) {
|
|
|
+
|
|
|
+ let ascore = Number(UserScore[j].Score);
|
|
|
+ console.log('ascore=',ascore)
|
|
|
+ if (ascore!=-1) {
|
|
|
+ totalScore += ascore;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
this.dataUsers_all[i].TotalScore = totalScore;
|
|
|
}
|
|
|
},
|