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

1.优化方法执行顺序

GouGengquan пре 6 месеци
родитељ
комит
d4edfe294a
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/views/assets/workbench/calculate/importInfo.vue

+ 4 - 0
src/views/assets/workbench/calculate/importInfo.vue

@@ -1476,6 +1476,10 @@ export default {
     },
     // 计算直接观察成新率(操作Table Row数据)
     countDepreciationRate(row) {
+      row.depreciationRateByAge =
+        (row.economicServiceLife - row.yearsInUse) / row.economicServiceLife < 0.15
+          ? ((row.remainingUsefulLife * 1) / (row.yearsInUse * 1 + row.remainingUsefulLife * 1)).toFixed(2) * 100
+          : ((row.economicServiceLife - row.yearsInUse) / row.economicServiceLife).toFixed(2) * 100
       /**
        * 年限成新率个位<=2成新率个位为0不进位
        * 年限成新率个位>=8个位为0进一位