Ver código fonte

评分占比去掉小数

SanHQin 1 ano atrás
pai
commit
92a14c6c90
1 arquivos alterados com 10 adições e 10 exclusões
  1. 10 10
      src/components/pages/disAdmin/score.vue

+ 10 - 10
src/components/pages/disAdmin/score.vue

@@ -549,11 +549,11 @@ export default {
 
 			five[0] = this.total-myScore.length;
 
-			one[1] = (one[0]/this.total*100).toFixed(1)
-			two[1] = (two[0]/this.total*100).toFixed(1)
-			three[1] = (three[0]/this.total*100).toFixed(1)
-			four[1] = (four[0]/this.total*100).toFixed(1)
-			five[1] = (five[0]/this.total*100).toFixed(1)
+			one[1] = (one[0]/this.total*100).toFixed(0)
+			two[1] = (two[0]/this.total*100).toFixed(0)
+			three[1] = (three[0]/this.total*100).toFixed(0)
+			four[1] = (four[0]/this.total*100).toFixed(0)
+			five[1] = (five[0]/this.total*100).toFixed(0)
 			
 			return {one:one,two:two,three:three,four:four,five:five}
 		},
@@ -582,11 +582,11 @@ export default {
 				}
 			})
 
-			one[1] = (one[0]/this.total*100).toFixed(1)
-			two[1] = (two[0]/this.total*100).toFixed(1)
-			three[1] = (three[0]/this.total*100).toFixed(1)
-			four[1] = (four[0]/this.total*100).toFixed(1)
-			five[1] = (five[0]/this.total*100).toFixed(1)
+			one[1] = (one[0]/this.total*100).toFixed(0)
+			two[1] = (two[0]/this.total*100).toFixed(0)
+			three[1] = (three[0]/this.total*100).toFixed(0)
+			four[1] = (four[0]/this.total*100).toFixed(0)
+			five[1] = (five[0]/this.total*100).toFixed(0)
 			
 			return {one:one,two:two,three:three,four:four,five:five}
 		}