Explorar el Código

修改系统工作日志任务完成率显示NAN

Renxy hace 1 año
padre
commit
544a85e86e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/pages/SystemDaily/index.js

+ 2 - 2
src/pages/SystemDaily/index.js

@@ -15,11 +15,11 @@ const SystemDaily = (props) => {
       const result = {
         ...data,
         task_percent:
-          data.push_task !== 0
+          Number(data.push_task) !== 0
             ? (data.push_complete_task / data.push_task).toFixed(2)
             : 0,
         work_percent:
-          data.work_order_task !== 0
+          Number(data.work_order_task) !== 0
             ? (data.work_order_complete_task / data.work_order_task).toFixed(2)
             : 0,
       };