From 54bd5c3bb11c1bc1546a2db8f9c577a5ed9d8bee Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 12 May 2022 16:16:35 +0800 Subject: [PATCH] edit --- proxy.conf.js | 22 +++++------ .../dataindex/dataindex.component.ts | 38 +++++++++++-------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index b9211e38..eb14ed31 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -18,19 +18,9 @@ module.exports = { // secure: false, // Ignore invalid SSL certificates // changeOrigin: true // } - // '//api': { - // target: { - // host: 'tms-api.yunduoxing.com', - // protocol: 'https:', - // port: 443 - // }, - // secure: false, - // changeOrigin: true, - // logLevel: 'debug' - // }, '//api': { target: { - host: 'tms-api-dev.eascs.com', + host: 'tms-api.yunduoxing.com', protocol: 'https:', port: 443 }, @@ -38,4 +28,14 @@ module.exports = { changeOrigin: true, logLevel: 'debug' }, + // '//api': { + // target: { + // host: 'tms-api-test.eascs.com', + // protocol: 'https:', + // port: 443 + // }, + // secure: false, + // changeOrigin: true, + // logLevel: 'debug' + // }, }; diff --git a/src/app/routes/datatable/components/dataindex/dataindex.component.ts b/src/app/routes/datatable/components/dataindex/dataindex.component.ts index 12562a13..e8a6ee5f 100644 --- a/src/app/routes/datatable/components/dataindex/dataindex.component.ts +++ b/src/app/routes/datatable/components/dataindex/dataindex.component.ts @@ -53,7 +53,9 @@ export class DatatableDataindexComponent implements OnInit, AfterViewInit { this.service.request(this.service.$api_total_advance_deposit).subscribe((res: DataTotalVO) => { if (res) { this.totalAdvanceDeposit = this.formatMiniAreaData(res); - this.initAreaMap(this.AdvanceDeposit['el'].nativeElement as any, []); + setTimeout(() => { + this.initAreaMap(this.AdvanceDeposit['el'].nativeElement as any, []); + }, 400); } }); // 业绩量总额 @@ -82,8 +84,9 @@ export class DatatableDataindexComponent implements OnInit, AfterViewInit { if (res) { const billTypeDatas2 = this.formatCoordinateData(res); console.log(billTypeDatas2); - - this.initBillChart(this.g2custom['el'].nativeElement as any, billTypeDatas2); + setTimeout(() => { + this.initBillChart(this.g2custom['el'].nativeElement as any, billTypeDatas2); + }, 100); } }); // 大区业绩完成情况 @@ -92,30 +95,35 @@ export class DatatableDataindexComponent implements OnInit, AfterViewInit { // this.regionalPerformanceCompletion = res.map(item => ({ ...item, time: new Date(item.time)?.getTime() })); // this.initRegionalPerformanceChart(this.RegionalPerforman['el'].nativeElement as any, this.regionalPerformanceCompletion); this.regionalPerformanceCompletion = this.formatBarData(res); - this.initBiaxialChart(this.RegionalPerforman['el'].nativeElement as any, this.regionalPerformanceCompletion, { - y1Title: '业绩量(万)', - y2Title: '业绩完成率', - y3Title: '同期业绩完成率' - }); + setTimeout(() => { + this.initBiaxialChart(this.RegionalPerforman['el'].nativeElement as any, this.regionalPerformanceCompletion, { + y1Title: '业绩量(万)', + y2Title: '业绩完成率', + y3Title: '同期业绩完成率' + }); + }, 100); } }); // 订单类型比例 this.service.request(this.service.$api_getWayBillDirectProportion).subscribe(res => { if (res) { const billTypeDatas = this.formatCoordinateData(res.map((item: any) => ({ ...item, billType: item.wayBillType }))); - console.log(billTypeDatas); - this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas); + setTimeout(() => { + this.initBillChart(this.BillDirectProportion['el'].nativeElement as any, billTypeDatas); + }, 100); } }); // 统计订单结算金额-趋势 this.service.request(this.service.$api_get_bill_payment_amount).subscribe(res => { if (res) { this.salesData = this.formatBarData(res); - this.initBiaxialChart(this.SaleProportion['el'].nativeElement as any, this.salesData, { - y1Title: '业绩量(万)', - y2Title: '业绩完成率', - y3Title: '同期业绩完成率' - }); + setTimeout(() => { + this.initBiaxialChart(this.SaleProportion['el'].nativeElement as any, this.salesData, { + y1Title: '业绩量(万)', + y2Title: '业绩完成率', + y3Title: '同期业绩完成率' + }); + }, 100); } }); }