|
@@ -318,7 +318,8 @@
|
|
|
<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingData.one[1])<=5?'#E2F0D9':'#FCE4D6'}`">90分以上:{{ratingData.one[0]}}个 {{ratingData.one[1]}}%</div>
|
|
|
<div class="ri-card" :style="`background-color: ${Math.abs(40-ratingData.two[1])<=5?'#E2F0D9':'#FCE4D6'}`">89-75分:{{ratingData.two[0]}}个 {{ratingData.two[1]}}%</div>
|
|
|
<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingData.three[1])<=5?'#E2F0D9':'#FCE4D6'}`">74-60分以上:{{ratingData.three[0]}}个 {{ratingData.three[1]}}%</div>
|
|
|
- <div class="ri-card" style="background-color: #E7E6E6;">未评分:{{ratingData.four[0]}}个 {{ratingData.four[1]}}%</div>
|
|
|
+ <div class="ri-card" :style="`background-color: #FCE4D6`" v-if="ratingData.four[0]!=0">60分以下:{{ratingData.four[0]}}个 {{ratingData.four[1]}}%</div>
|
|
|
+ <div class="ri-card" style="background-color: #E7E6E6;">未评分:{{ratingData.five[0]}}个 {{ratingData.five[1]}}%</div>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
|
|
@@ -327,7 +328,8 @@
|
|
|
<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingData.one[1])<=5?'#E2F0D9':'#FCE4D6'}`">90分以上:{{ratingDataAdmin.one[0]}}个 {{ratingDataAdmin.one[1]}}%</div>
|
|
|
<div class="ri-card" :style="`background-color: ${Math.abs(40-ratingData.two[1])<=5?'#E2F0D9':'#FCE4D6'}`">89-75分:{{ratingDataAdmin.two[0]}}个 {{ratingDataAdmin.two[1]}}%</div>
|
|
|
<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingData.three[1])<=5?'#E2F0D9':'#FCE4D6'}`">74-60分以上:{{ratingDataAdmin.three[0]}}个 {{ratingDataAdmin.three[1]}}%</div>
|
|
|
- <div class="ri-card" style="background-color: #E7E6E6;">未评分:{{ratingDataAdmin.four[0]}}个 {{ratingDataAdmin.four[1]}}%</div>
|
|
|
+ <div class="ri-card" :style="`background-color: #FCE4D6`" v-if="ratingDataAdmin.four[0]!=0">60分以下:{{ratingDataAdmin.four[0]}}个 {{ratingDataAdmin.four[1]}}%</div>
|
|
|
+ <div class="ri-card" style="background-color: #E7E6E6;">未评分:{{ratingDataAdmin.five[0]}}个 {{ratingDataAdmin.five[1]}}%</div>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
@@ -527,6 +529,7 @@ export default {
|
|
|
let two = [0,0];
|
|
|
let three = [0,0];
|
|
|
let four = [0,0];
|
|
|
+ let five = [0,0]
|
|
|
|
|
|
myScore.forEach(i=>{
|
|
|
let score = JSON.parse(i.score);
|
|
@@ -537,17 +540,20 @@ export default {
|
|
|
two[0]++;
|
|
|
}else if(total>=60 && total<=74){
|
|
|
three[0]++;
|
|
|
+ }else{
|
|
|
+ four[0]++;
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- four[0] = this.total-myScore.length;
|
|
|
+ five[0] = this.total-myScore.length;
|
|
|
|
|
|
- one[1] = (one[0]/this.total).toFixed(4)*100
|
|
|
- two[1] = (two[0]/this.total).toFixed(4)*100
|
|
|
- three[1] = (three[0]/this.total).toFixed(4)*100
|
|
|
- four[1] = (four[0]/this.total).toFixed(4)*100
|
|
|
+ one[1] = (one[0]/this.total*100).toFixed(2)
|
|
|
+ two[1] = (two[0]/this.total*100).toFixed(2)
|
|
|
+ three[1] = (three[0]/this.total*100).toFixed(2)
|
|
|
+ four[1] = (four[0]/this.total*100).toFixed(2)
|
|
|
+ five[1] = (five[0]/this.total*100).toFixed(2)
|
|
|
|
|
|
- return {one:one,two:two,three:three,four:four}
|
|
|
+ return {one:one,two:two,three:three,four:four,five:five}
|
|
|
},
|
|
|
ratingDataAdmin(){
|
|
|
const score = this.scoreListData;
|
|
@@ -556,27 +562,31 @@ export default {
|
|
|
let two = [0,0];
|
|
|
let three = [0,0];
|
|
|
let four = [0,0];
|
|
|
+ let five = [0,0]
|
|
|
|
|
|
score.forEach(i=>{
|
|
|
let sum = i.sum;
|
|
|
- if(sum===0){
|
|
|
- four[0]++
|
|
|
+ if(!sum){
|
|
|
+ return five[0]++
|
|
|
}
|
|
|
if(parseFloat(sum)>=90){
|
|
|
- one[0]++
|
|
|
+ return one[0]++
|
|
|
}else if(parseFloat(sum)>=75 && parseFloat(sum)<=89){
|
|
|
- two[0]++;
|
|
|
+ return two[0]++;
|
|
|
}else if(parseFloat(sum)>=60 && parseFloat(sum)<=74){
|
|
|
- three[0]++;
|
|
|
+ return three[0]++;
|
|
|
+ }else{
|
|
|
+ return four[0]++;
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- one[1] = (one[0]/this.total).toFixed(4)*100
|
|
|
- two[1] = (two[0]/this.total).toFixed(4)*100
|
|
|
- three[1] = (three[0]/this.total).toFixed(4)*100
|
|
|
- four[1] = (four[0]/this.total).toFixed(4)*100
|
|
|
+ one[1] = (one[0]/this.total*100).toFixed(2)
|
|
|
+ two[1] = (two[0]/this.total*100).toFixed(2)
|
|
|
+ three[1] = (three[0]/this.total*100).toFixed(2)
|
|
|
+ four[1] = (four[0]/this.total*100).toFixed(2)
|
|
|
+ five[1] = (five[0]/this.total*100).toFixed(2)
|
|
|
|
|
|
- return {one:one,two:two,three:three,four:four}
|
|
|
+ return {one:one,two:two,three:three,four:four,five:five}
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|