diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ed6aca8..de9c538 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -165,7 +165,7 @@ load() { // this.showData = true; totalRpt().then(res => { - res.visit_enter.per = (res.visit_enter.total / (res.visit_total.total == 0 ? 1 : res.visit_total.total)) * 100 + "%" + res.visit_enter.per = ((res.visit_enter.total / (res.visit_total.total == 0 ? 1 : res.visit_total.total)) * 100).toFixed(2) + "%" this.totaldata = res; }) diff --git a/src/views/report/visit/periodRpt.vue b/src/views/report/visit/periodRpt.vue index 97aebec..2c29fae 100644 --- a/src/views/report/visit/periodRpt.vue +++ b/src/views/report/visit/periodRpt.vue @@ -107,7 +107,7 @@ date:this.searchFields.date }).then((res) => { for (var m of res) { - m.per = (m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100 + "%" + m.per = ((m.use_total / (m.plan_total == 0 ? 1 : m.plan_total)) * 100).toFixed(2) + "%" m.daterange = m.start_time+"-"+m.end_time; xArr.push(m.daterange); planarr.push(