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获取名称 */