Pārlūkot izejas kodu

js浮点数*100问题

Your Name 1 gadu atpakaļ
vecāks
revīzija
887f9d9a02
2 mainītis faili ar 23 papildinājumiem un 23 dzēšanām
  1. 22 22
      src/components/DiagCalc.vue
  2. 1 1
      src/components/DiagCalcShow.vue

+ 22 - 22
src/components/DiagCalc.vue

@@ -480,28 +480,28 @@
             return
           }
         }
-        if (!this.form.cxsjt3) {
-          MessageBox({
-            title: '提示',
-            message: '请选择采血时间t<sub>3</sub>'
-          })
-          return
-        }
-        if (!this.form.t3hx) {
-          MessageBox({
-            title: '提示',
-            message: '请输入t<sub>3</sub>点活性'
-          })
-          return
-        } else {
-          if (!this.$recheck.checkIntFloat12(this.form.t3hx)) {
-            MessageBox({
-              title: '提示',
-              message: 't<sub>3</sub>点活性请输入整数或2位小数'
-            })
-            return
-          }
-        }
+        // if (!this.form.cxsjt3) {
+        //   MessageBox({
+        //     title: '提示',
+        //     message: '请选择采血时间t<sub>3</sub>'
+        //   })
+        //   return
+        // }
+        // if (!this.form.t3hx) {
+        //   MessageBox({
+        //     title: '提示',
+        //     message: '请输入t<sub>3</sub>点活性'
+        //   })
+        //   return
+        // } else {
+        //   if (!this.$recheck.checkIntFloat12(this.form.t3hx)) {
+        //     MessageBox({
+        //       title: '提示',
+        //       message: 't<sub>3</sub>点活性请输入整数或2位小数'
+        //     })
+        //     return
+        //   }
+        // }
         // if (!this.form.yfghx) {
         //   MessageBox({
         //     title: '提示',

+ 1 - 1
src/components/DiagCalcShow.vue

@@ -69,7 +69,7 @@
         </div>
         <div style="display:flex;">
           <div class="rowfont" style="width:50%;">利用率%</div>
-          <div class="rowfont" style="width:50%;color:#888;">{{caseInfo.lyl*100}}</div>
+          <div class="rowfont" style="width:50%;color:#888;">{{(caseInfo.lyl*100).toFixed()}}</div>
         </div>
         <div style="display:flex;">
           <div class="rowfont" style="width:50%;">预期峰值活性%</div>