Преглед изворни кода

fix: 修改合格率显示格式并添加调试日志

yusheng пре 1 месец
родитељ
комит
ecb8194587
1 измењених фајлова са 6 додато и 6 уклоњено
  1. 6 6
      src/views/inspectionWork/edit.vue

+ 6 - 6
src/views/inspectionWork/edit.vue

@@ -84,9 +84,8 @@
               <el-input
                 v-model="form.sampleQualificationRate"
                 disabled
-                type="number"
+                type="text"
               >
-                <template slot="append">%</template>
               </el-input>
             </el-form-item>
           </el-col>
@@ -98,9 +97,8 @@
               <el-input
                 v-model="form.sampleNoQualificationRate"
                 disabled
-                type="number"
+                type="text"
               >
-                <template slot="append">%</template>
               </el-input>
             </el-form-item>
           </el-col>
@@ -437,11 +435,11 @@
               this.form.sampleNoQualificationRate = (
                 (num / total) *
                 100
-              ).toFixed(2);
+              ).toFixed(2)+'%';
               this.form.sampleQualificationRate = (
                 (this.form.sampleQualifiedNumber / total) *
                 100
-              ).toFixed(2);
+              ).toFixed(2)+'%';
             }
           }
           this.quantityAssignment();
@@ -757,6 +755,7 @@
         // });
 
         // this.$set(this.form, 'resultsTotal', resultsTotal);
+        console.log(sampleQualificationRate, 'sampleQualificationRate');
         this.$set(
           this.form,
           'sampleQualificationRate',
@@ -776,6 +775,7 @@
           sampleNoQualifiedNumber
         );
         // 数量赋值
+        console.log(this.form, 'this.form');
 
         this.quantityAssignment();
       },