From de9b24c81e1f894e9105f929a155665e6feb8914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=B0=91=E5=BA=B7?= Date: Fri, 20 Oct 2023 18:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../usercenter/components/dataStatistics.vue | 52 +++++++++++----------- src/utils/commonUtil.js | 8 ++++ 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/src/components/userinfo/usercenter/components/dataStatistics.vue b/src/components/userinfo/usercenter/components/dataStatistics.vue index 0cf38ad..3b069be 100644 --- a/src/components/userinfo/usercenter/components/dataStatistics.vue +++ b/src/components/userinfo/usercenter/components/dataStatistics.vue @@ -63,11 +63,11 @@
在职人数
- {{totalObj.entryGPA}} + {{toFixed(totalObj.entryGPA)}}
入职绩点
- {{totalObj.finshedGPA}} + {{toFixed(totalObj.finshedGPA)}}
交付绩点
@@ -117,7 +117,7 @@ diff --git a/src/utils/commonUtil.js b/src/utils/commonUtil.js index 4551895..5d0c5c0 100644 --- a/src/utils/commonUtil.js +++ b/src/utils/commonUtil.js @@ -19,6 +19,14 @@ export function isEmptyCheck(value) { export function isNotEmptyCheck(value) { return !isEmptyCheck(value); } + +export function toFixed(value) { + if(value == 0 || value == '0'){ + return 0 + }else{ + return new Number(value).toFixed(2); + } +} /** * 根据状态工单类型ID获取名称 */