Zimo 5 дней назад
Родитель
Сommit
71d9ead155
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      src/views/pms/iotrydailyreport/ry-xj-form.vue

+ 5 - 2
src/views/pms/iotrydailyreport/ry-xj-form.vue

@@ -451,7 +451,9 @@ const computedAllocatedEfficiency = useDebounceFn(function (row: ReportDetail) {
 
   console.log('row', row)
 
-  row.allocatedEfficiency = Number((row.allocatedTime / row.duration).toFixed(2))
+  console.log((row.allocatedTime / row.duration).toFixed(4))
+
+  row.allocatedEfficiency = Number(row.allocatedTime / row.duration)
 }, 100)
 
 const calculate = (row: ReportDetail) => {
@@ -868,7 +870,8 @@ const allocatedTimeDisabled = computed(() => {
                 align="center"
                 prop="allocatedEfficiency"
                 :formatter="
-                  (row) => (row.allocatedEfficiency ? `${row.allocatedEfficiency * 100}%` : '')
+                  (row) =>
+                    row.allocatedEfficiency ? `${(row.allocatedEfficiency * 100).toFixed(2)}%` : ''
                 "
               />