From 29d964cafdaf1b01bebf81d9318453af1359c0f9 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 6 Apr 2022 20:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customindex/customindex.component.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts index e6ad7eb9..310d11d0 100644 --- a/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts +++ b/src/app/routes/datatable/components/customtable/customindex/customindex.component.ts @@ -38,7 +38,7 @@ export class DatatableCustomindexComponent implements OnInit { { title: '未激活用户数', index: 'notActivationTotal', className: 'text-center' }, { title: '沉默用户数', index: 'silentTotal', className: 'text-center' }, { title: '流失用户数', index: 'drainTotal', className: 'text-center' }, - { title: '流失率', index: 'drainRate', className: 'text-center' } + { title: '流失率', index: 'drainRate', className: 'text-center',format: (item: any) => {return (item?.drainRate)*100 + '%' }} ]; hzData: any; hhrData: any; @@ -51,26 +51,11 @@ export class DatatableCustomindexComponent implements OnInit { this.initCurveData(); } initCurveData() { - let type = 1; - if (this.mode === 'year') { - type = 1; - } else if (this.mode === 'month') { - type = 2; - } - // const params: any = { - // time: this.timeNext, - // type - // }; - this.flag = true; - - this.cardData(); this.listData(); this.addData('year', '2022-01-01'); } listData(type?: string, stime?: any, etime?: any) { - console.log('88888'); - this.reportData = []; this.service .request(this.service.$api_statistics_totalDetail, { @@ -194,7 +179,6 @@ export class DatatableCustomindexComponent implements OnInit { } }); } - changeData() { if (this.mode === 'year') { this.dateFormat = 'yyyy';