From 7dba00a80cee072bc9e193d5d2a75c1f7cf72d28 Mon Sep 17 00:00:00 2001 From: gaoluyang <gaoluyang@rengu.cc> Date: 星期四, 04 七月 2024 10:51:41 +0800 Subject: [PATCH] 表格输入框转换为科学计数法 --- src/components/view/b4-daily-business-statistics.vue | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/view/b4-daily-business-statistics.vue b/src/components/view/b4-daily-business-statistics.vue index 01a9951..d8c0c0c 100644 --- a/src/components/view/b4-daily-business-statistics.vue +++ b/src/components/view/b4-daily-business-statistics.vue @@ -147,10 +147,13 @@ }, pageData:{}, loading:false, + timers:null, } }, mounted(){ this.init() + this.timers&&clearInterval(this.timers); + setInterval(this.init(),1000*60*5) }, methods:{ init(){ @@ -161,7 +164,8 @@ if (res.code == 201) return this.pageData = this.HaveJson(res.data) let xData = res.data.DAYS.map(m=>{ - return `${m[1]}-${m[2]}` + let arr = m.split('-') + return `${arr[1]}-${arr[2]}` }) this.chartData0.xData = xData this.chartData1.xData = xData @@ -175,11 +179,14 @@ }, handleData(val){ if(val){ - return Math.abs(val)*100; + return (Math.abs(val)*100).tofixed(0); }else{ return '0' } } + }, + deactivated(){ + this.timers&&clearInterval(this.timers); } } </script> -- Gitblit v1.9.3