linxuxiang 2 mesi fa
parent
commit
1d8f30ceab
1 ha cambiato i file con 8 aggiunte e 8 eliminazioni
  1. 8 8
      src/views/train/test.vue

+ 8 - 8
src/views/train/test.vue

@@ -571,15 +571,15 @@ const getFaceWindow = (data: boolean, num: number = 0) => {
 const getAchievement = (data: any) => {
   //console.log("成绩", data);
   let type = parameter.value.project;
-  let count =
-    data?.[dic.typeResultKey[type]]?.toFixed(0);
+  let result =
+    data?.[dic.typeResultKey[type]];
+    let count = null;
   if (["trijump", "solidball", "shotput", "longjump"].includes(type)) {
-    count =
-      data?.[dic.typeResultKey[type]]?.toFixed(2);
-    count = Math.round(count) / 100;
-  }
-  if (["basketballv1", "footballv1"].includes(type)) {
-    count = proxy?.$utils.runTime(data?.[dic.typeResultKey[type]], true, 1)
+    count = (Math.round(result) / 100).toFixed(2);
+  }else if(["basketballv1", "footballv1"].includes(type)){
+    count = proxy?.$utils.runTime(result, true, 1)
+  }else{
+    count = result;
   }
   data.count = count || "0";
   data.score = data.score || "0";